summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/dsl/recipe.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/chef/dsl/recipe.rb b/lib/chef/dsl/recipe.rb
index 3282320b8c..d88c0a4569 100644
--- a/lib/chef/dsl/recipe.rb
+++ b/lib/chef/dsl/recipe.rb
@@ -52,9 +52,7 @@ class Chef
end
def has_resource_definition?(name)
- yes_or_no = run_context.definitions.has_key?(name)
-
- yes_or_no
+ run_context.definitions.has_key?(name)
end
# Processes the arguments and block as a resource definition.
@@ -68,12 +66,10 @@ class Chef
# This sets up the parameter overrides
new_def.instance_eval(&block) if block
-
new_recipe = Chef::Recipe.new(cookbook_name, recipe_name, run_context)
new_recipe.params = new_def.params
new_recipe.params[:name] = args[0]
new_recipe.instance_eval(&new_def.recipe)
- new_recipe
end
# Instantiates a resource (via #build_resource), then adds it to the