Class: Chef::ResourceDefinitionList
- Inherits:
-
Object
- Object
- Chef::ResourceDefinitionList
- Includes:
- Mixin::FromFile
- Defined in:
- lib/chef/resource_definition_list.rb
Instance Attribute Summary collapse
-
#defines ⇒ Object
Returns the value of attribute defines.
Attributes included from Mixin::FromFile
Instance Method Summary collapse
- #define(resource_name, prototype_params = nil, &block) ⇒ Object
-
#initialize ⇒ ResourceDefinitionList
constructor
A new instance of ResourceDefinitionList.
Methods included from Mixin::FromFile
Constructor Details
#initialize ⇒ ResourceDefinitionList
Returns a new instance of ResourceDefinitionList.
28 29 30 |
# File 'lib/chef/resource_definition_list.rb', line 28 def initialize @defines = {} end |
Instance Attribute Details
#defines ⇒ Object
Returns the value of attribute defines.
26 27 28 |
# File 'lib/chef/resource_definition_list.rb', line 26 def defines @defines end |
Instance Method Details
#define(resource_name, prototype_params = nil, &block) ⇒ Object
32 33 34 35 36 |
# File 'lib/chef/resource_definition_list.rb', line 32 def define(resource_name, prototype_params = nil, &block) @defines[resource_name] = ResourceDefinition.new @defines[resource_name].define(resource_name, prototype_params, &block) true end |