Method: Chef::Resource#initialize
- Defined in:
- lib/devstructure/chef.rb
#initialize(type, name, options = {}) ⇒ Resource
A Chef resource has a type, a name, and some options. The type is simply the name of the method that will be called in the recipe file. the name is the only argument to that method. The options will be converted to method calls and arguments within the block attached to each resource.
136 137 138 139 140 141 |
# File 'lib/devstructure/chef.rb', line 136 def initialize(type, name, ={}) super nil clear .each { |k, v| self[k.to_s] = v } @type, @name = type, name end |