Method: Chef::Mixin::Template::TemplateContext#node
- Defined in:
- lib/chef/mixin/template.rb
#node ⇒ Object
Returns the current node object, or raises an error if it’s not set. Provides API consistency, allowing users to reference the node object by the bare ‘node` everywhere.
103 104 105 106 107 108 |
# File 'lib/chef/mixin/template.rb', line 103 def node return @node if @node raise "Could not find a value for node. If you are explicitly setting variables in a template, " + "include a node variable if you plan to use it." end |