Created
March 11, 2010 23:27
-
-
Save apsoto/329829 to your computer and use it in GitHub Desktop.
monkey patching chef
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
| # file in your cookbook's library dir | |
| module Crazy | |
| def go_nuts | |
| end | |
| end | |
| class Chef::Resource | |
| include Crazy | |
| end | |
| class Chef::Recipe | |
| include Crazy | |
| end |
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
| # in the recipe | |
| go_nuts | |
| # or in the resource | |
| service "foo" do | |
| go_nuts | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment