Created
February 26, 2013 17:31
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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