Created
May 14, 2009 20:15
-
-
Save jashmenn/111874 to your computer and use it in GitHub Desktop.
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
def require_chef_recipe | |
unless @required_chef_recipe | |
include_chef_recipe "god" # requires opscode chef recipes | |
@required_chef_recipe = true | |
end | |
end | |
# wish it could be | |
def require_chef_recipe | |
do_once do | |
include_chef_recipe "god" # requires opscode chef recipes | |
end | |
end | |
# example | |
def require_chef_recipe | |
do_once do | |
puts "hi" | |
end | |
end | |
require_chef_recipe # => "hi" | |
require_chef_recipe # => nothing happens |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment