Created
June 9, 2010 20:41
-
-
Save jarib/432138 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
| class Command | |
| def self.before_main(*syms) | |
| return @before_main_methods if syms.empty? | |
| @before_main_methods = syms | |
| end | |
| def before_main | |
| meths = self.class.before_main | |
| meths.each { |m| send(m) } if meths | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment