Skip to content

Instantly share code, notes, and snippets.

@directionless
Last active Dec 16, 2015
Embed
What would you like to do?
class Chef::Recipe
def find_nrpe_plugin(name)
return name if name.start_with?("/")
end
end
<%= ::Chef::Recipe::find_nrpe_plugin hi %>
# results in:
# Chef::Mixin::Template::TemplateError
# ------------------------------------
# undefined method `find_nrpe_plugin' for Chef::Recipe:Class
<%= find_nrpe_plugin hi %>
# results in:
# Chef::Mixin::Template::TemplateError
# ------------------------------------
# undefined method `find_nrpe_plugin' for #<Erubis::Context:0x00000001043ea8>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment