Module: QED
- Defined in:
- lib/qed.rb,
lib/qed/scope.rb,
lib/qed/advice.rb,
lib/qed/config.rb,
lib/qed/script.rb,
lib/qed/command.rb,
lib/qed/session.rb,
lib/qed/evaluator.rb,
lib/qedoc/document.rb,
lib/qed/advice/events.rb,
lib/qed/reporter/base.rb,
lib/qed/reporter/html.rb,
lib/qed/advice/patterns.rb,
lib/qed/reporter/bullet.rb,
lib/qed/reporter/verbatim.rb,
lib/qedoc/document/markup.rb,
lib/qed/reporter/dotprogress.rb
Defined Under Namespace
Modules: Advisable, DomainLanguage, Reporter Classes: Advice, Command, Document, Evaluator, Patterns, Profile, Scope, Script, Session, Template
Constant Summary collapse
- VERSION =
:till: VERSION=“<%= version %>”
"2.1.1"
Class Method Summary collapse
-
.root(path = nil) ⇒ Object
Is there no perfect way to find root directory of a project?.
Class Method Details
.root(path = nil) ⇒ Object
Is there no perfect way to find root directory of a project?
271 272 273 274 275 276 277 278 279 280 |
# File 'lib/qed/command.rb', line 271 def self.root(path=nil) path ||= Dir.pwd path = File.dirname(path) unless File.directory?(path) until path == File.dirname(path) mark = Dir[File.join(path, 'README*')].first return path if mark path = File.dirname(path) end nil end |