Class: Chef::Node
- Inherits:
-
Object
- Object
- Chef::Node
- Defined in:
- lib/chef/sugar/node.rb
Instance Method Summary collapse
-
#in?(environment) ⇒ Boolean
Determine if the current node is in the given Chef environment (or matches the given regular expression).
-
#includes_recipe?(recipe_name) ⇒ Boolean
(also: #include_recipe?)
Determine if the current node includes the given recipe name.
Instance Method Details
#in?(environment) ⇒ Boolean
Determine if the current node is in the given Chef environment (or matches the given regular expression).
27 28 29 |
# File 'lib/chef/sugar/node.rb', line 27 def in?(environment) environment === chef_environment end |
#includes_recipe?(recipe_name) ⇒ Boolean Also known as: include_recipe?
Determine if the current node includes the given recipe name.
36 37 38 |
# File 'lib/chef/sugar/node.rb', line 36 def includes_recipe?(recipe_name) run_list.include?(recipe_name) end |