Class | Chef::Recipe
In: | lib/chef/recipe.rb
Parent: | Object

## Chef::Recipe

A Recipe object is the context in which Chef recipes are evaluated.

### Methods

new node parse_recipe_name resources tag tagged? untag

### Included Modules

Chef::Mixin::FromFile Chef::Mixin::Language Chef::Mixin::LanguageIncludeRecipe Chef::Mixin::RecipeDefinitionDSLCore Chef::Mixin::Deprecation

### Attributes

cookbook_name | [RW] |
params | [RW] |
recipe | [RW] |
recipe_name | [RW] |
run_context | [RW] |

### Public Class methods

new(cookbook_name, recipe_name, run_context)
parse_recipe_name(recipe_name)

Parses a potentially fully-qualified recipe name into its cookbook name and recipe short name.

For example:

      "aws::elastic_ip" returns [:aws, "elastic_ip"]
      "aws" returns [:aws, "default"]

### Public Instance methods

node()

Used in DSL mixins

resources(*args)

Used by the DSL to look up resources when executing in the context of a recipe.

tag(*tags)

Sets a tag, or list of tags, for this node. Syntactic sugar for run_context.node[:tags].

With no arguments, returns the list of tags.

### Parameters

tags<Array>: | A list of tags to add - can be a single string

### Returns

tags<Array>: | The contents of run_context.node[:tags]

tagged?(*tags)

Returns true if the node is tagged with all of the supplied `tags`.

### Parameters

tags<Array>: | A list of tags

### Returns

true<TrueClass>: | If all the parameters are present
false<FalseClass>: | If any of the parameters are missing

untag(*tags)

Removes the list of tags from the node.

### Parameters

tags<Array>: | A list of tags

### Returns

tags<Array>: | The current list of run_context.node[:tags]

[Validate]