diff options
author | Adam Jacob <adam@hjksolutions.com> | 2008-07-10 19:58:43 -0700 |
---|---|---|
committer | Adam Jacob <adam@hjksolutions.com> | 2008-07-10 19:58:43 -0700 |
commit | d734c714c1e7598ddba40b47c26d10f002e06420 (patch) | |
tree | f45f547500cc1bcb10a1fad4bb5af5213736c2e9 /lib/chef/recipe.rb | |
parent | c4e77b13c03d4d43b94b051cc819ff83a42f0ab5 (diff) | |
download | chef-d734c714c1e7598ddba40b47c26d10f002e06420.tar.gz |
Adding functional search support
Diffstat (limited to 'lib/chef/recipe.rb')
-rw-r--r-- | lib/chef/recipe.rb | 6 |
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) |