Module: Paths
- Defined in:
- lib/canuby/util.rb
Overview
Folder and files related methods
Class Method Summary collapse
-
.base_dir ⇒ Object
Returns the dependency folder custom allows to change the default path.
- .base_dir=(var) ⇒ Object
-
.build_dir(project) ⇒ Object
Returns a projects build dir.
-
.create ⇒ Object
Create build folders.
-
.stage_dir ⇒ Object
returns stage dir.
Class Method Details
.base_dir ⇒ Object
Returns the dependency folder custom allows to change the default path
96 97 98 |
# File 'lib/canuby/util.rb', line 96 def self.base_dir @base_dir end |
.base_dir=(var) ⇒ Object
90 91 92 |
# File 'lib/canuby/util.rb', line 90 def self.base_dir=(var) @base_dir = var end |
.build_dir(project) ⇒ Object
Returns a projects build dir
101 102 103 |
# File 'lib/canuby/util.rb', line 101 def self.build_dir(project) File.join(const_get(project).path, 'build') end |
.create ⇒ Object
Create build folders
111 112 113 |
# File 'lib/canuby/util.rb', line 111 def self.create mkdir_p stage_dir unless Dir.exist?(stage_dir) end |
.stage_dir ⇒ Object
returns stage dir
106 107 108 |
# File 'lib/canuby/util.rb', line 106 def self.stage_dir File.join(base_dir, 'lib') end |