Class: Pieces::Builder
- Inherits:
-
Object
- Object
- Pieces::Builder
- Defined in:
- lib/pieces/builder.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#route_config ⇒ Object
readonly
Returns the value of attribute route_config.
Class Method Summary collapse
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(config) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(config) ⇒ Builder
Returns a new instance of Builder.
13 14 15 16 |
# File 'lib/pieces/builder.rb', line 13 def initialize(config) @path = config[:path] @route_config ||= YAML.load_file("#{path}/config/pieces.yml") end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
10 11 12 |
# File 'lib/pieces/builder.rb', line 10 def path @path end |
#route_config ⇒ Object (readonly)
Returns the value of attribute route_config.
11 12 13 |
# File 'lib/pieces/builder.rb', line 11 def route_config @route_config end |
Class Method Details
.build(config) ⇒ Object
6 7 8 |
# File 'lib/pieces/builder.rb', line 6 def self.build(config) new(config).build end |
Instance Method Details
#build ⇒ Object
18 19 20 |
# File 'lib/pieces/builder.rb', line 18 def build save_files(build_files) end |