summaryrefslogtreecommitdiff
path: root/lib/chef/recipe.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/recipe.rb
parentc4e77b13c03d4d43b94b051cc819ff83a42f0ab5 (diff)
downloadchef-d734c714c1e7598ddba40b47c26d10f002e06420.tar.gz
Adding functional search support
Diffstat (limited to 'lib/chef/recipe.rb')
-rw-r--r--lib/chef/recipe.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/recipe.rb b/lib/chef/recipe.rb
index d7d1435eb4..47a194eda7 100644
--- a/lib/chef/recipe.rb
+++ b/lib/chef/recipe.rb
@@ -70,6 +70,11 @@ class Chef
def resources(*args)
@collection.resources(*args)
end
+
+ def search(type, query, &block)
+ s = Chef::Search.new
+ s.search(type, query, &block)
+ end
def method_missing(method_symbol, *args, &block)
resource = nil
@@ -98,6 +103,7 @@ class Chef
end
begin
args << @collection
+ args << @node
resource = eval(rname).new(*args)
resource.params = @params
resource.instance_eval(&block)