summaryrefslogtreecommitdiff
path: root/lib/chef/resource.rb
diff options
context:
space:
mode:
authorAdam Jacob <adam@hjksolutions.com>2008-07-10 19:58:43 -0700
committerAdam Jacob <adam@hjksolutions.com>2008-07-10 19:58:43 -0700
commitd734c714c1e7598ddba40b47c26d10f002e06420 (patch)
treef45f547500cc1bcb10a1fad4bb5af5213736c2e9 /lib/chef/resource.rb
parentc4e77b13c03d4d43b94b051cc819ff83a42f0ab5 (diff)
downloadchef-d734c714c1e7598ddba40b47c26d10f002e06420.tar.gz
Adding functional search support
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r--lib/chef/resource.rb5
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