Class: SousChef::NodeBuilder
- Inherits:
-
Object
- Object
- SousChef::NodeBuilder
- Includes:
- NodeHelpers
- Defined in:
- lib/sous-chef/node_builder.rb
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(name, collection_hash) ⇒ NodeBuilder
constructor
A new instance of NodeBuilder.
Methods included from NodeHelpers
Constructor Details
#initialize(name, collection_hash) ⇒ NodeBuilder
Returns a new instance of NodeBuilder.
4 5 6 7 |
# File 'lib/sous-chef/node_builder.rb', line 4 def initialize(name, collection_hash) @name = name @collection_hash = collection_hash end |
Instance Method Details
#build ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/sous-chef/node_builder.rb', line 9 def build if node?(@collection_hash) SousChef::Node.new(@name, @collection_hash) else build_nodes end end |