Created
July 2, 2011 11:10
-
-
Save andreacfm/1059940 to your computer and use it in GitHub Desktop.
post_instance_eval
This file contains 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 Andrea | |
module My_module | |
def self.configure | |
yield | |
end | |
def self.set(arg) | |
puts arg | |
end | |
end | |
end | |
#anywhere in my program initilizers | |
include Andrea | |
My_module.configure do | |
set "my setting" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment