Class: Chef::ResourceDefinitionList

Inherits:
Object
  • Object
show all
Includes:
Mixin::FromFile
Defined in:
lib/chef/resource_definition_list.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Mixin::FromFile

#class_from_file, #from_file

Constructor Details

#initializeResourceDefinitionList

Returns a new instance of ResourceDefinitionList.



28
29
30
# File 'lib/chef/resource_definition_list.rb', line 28

def initialize
  @defines = Hash.new
end

Instance Attribute Details

#definesObject

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