Module: Paths

Defined in:
lib/canuby/util.rb

Overview

Folder and files related methods

Class Method Summary collapse

Class Method Details

.base_dirObject

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

.createObject

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_dirObject

returns stage dir



106
107
108
# File 'lib/canuby/util.rb', line 106

def self.stage_dir
  File.join(base_dir, 'lib')
end