Module: Carpenter::BuilderLoader
- Defined in:
- lib/carpenter/builder_loader.rb
Class Attribute Summary collapse
-
.builder_paths ⇒ Object
Returns the value of attribute builder_paths.
Class Method Summary collapse
Class Attribute Details
.builder_paths ⇒ Object
Returns the value of attribute builder_paths.
4 5 6 |
# File 'lib/carpenter/builder_loader.rb', line 4 def builder_paths @builder_paths end |
Class Method Details
.builder_absolute_paths ⇒ Object
9 10 11 |
# File 'lib/carpenter/builder_loader.rb', line 9 def self.builder_absolute_paths builder_paths.map { |p| File.(p) } end |
.load_all ⇒ Object
13 14 15 16 17 |
# File 'lib/carpenter/builder_loader.rb', line 13 def self.load_all builder_absolute_paths.each do |p| load_path(p) if File.directory?(p) end end |
.load_path(path) ⇒ Object
19 20 21 22 23 |
# File 'lib/carpenter/builder_loader.rb', line 19 def self.load_path(path) Dir[File.join(path, "**", "*.rb")].each do |f| load f end end |