Method: Chef::CookbookVersion#has_template_for_node?

Defined in:
lib/chef/cookbook_version.rb

#has_template_for_node?(node, template_filename) ⇒ Boolean

Query whether a template file template_filename is available. File specificity for the given node is obeyed in the lookup.

Returns:

  • (Boolean)


272
273
274
# File 'lib/chef/cookbook_version.rb', line 272

def has_template_for_node?(node, template_filename)
  !!find_preferred_manifest_record(node, :templates, template_filename)
end