diff options
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r-- | lib/chef/resource.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb index 74f27bcb82..e42b791b1d 100644 --- a/lib/chef/resource.rb +++ b/lib/chef/resource.rb @@ -29,15 +29,16 @@ class Chef include Chef::Mixin::ParamsValidate attr_accessor :actions, :params, :provider, :updated, :allowed_actions, :collection - attr_reader :resource_name, :source_line + attr_reader :resource_name, :source_line, :node - def initialize(name, collection=nil) + def initialize(name, collection=nil, node=nil) @name = name if collection @collection = collection else @collection = Chef::ResourceCollection.new() end + @node = node ? node : Chef::Node.new @noop = nil @before = nil @actions = Hash.new |