Class: Ecic::Project
- Inherits:
-
Object
- Object
- Ecic::Project
- Defined in:
- lib/ecic/project.rb
Constant Summary collapse
- SCRIPT_ECIC =
File.join('src', 'config', 'ecic.rb')
Class Method Summary collapse
-
.root(path = Pathname.new(Dir.pwd)) ⇒ Object
Function that returns the root directory of a ECIC project.
Class Method Details
.root(path = Pathname.new(Dir.pwd)) ⇒ Object
Function that returns the root directory of a ECIC project
10 11 12 13 14 15 16 17 |
# File 'lib/ecic/project.rb', line 10 def self.root(path = Pathname.new(Dir.pwd)) if File.exists?(File.join(path, SCRIPT_ECIC)) return path elsif path.root? return nil end return root(path.parent) end |