Skip to content

Instantly share code, notes, and snippets.

@zts
Created February 26, 2013 17:31
Show Gist options
  • Save zts/5040376 to your computer and use it in GitHub Desktop.
Save zts/5040376 to your computer and use it in GitHub Desktop.
Injecting library methods into Chef Recipes and Resources. Stolen from http://pastie.org/6342636
module Extensions
def my_special_method
Chef::Log.info "HEY!"
end
end
[Chef::Recipe, Chef::Resource].each { |l| l.send :include, ::Extensions }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment