Created
March 28, 2010 15:31
-
-
Save maiha/346808 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
| # example for usage-completions | |
| # using http://github.com/maiha/thor/ | |
| # compare: http://github.com/maiha/thor/tree/complete-usage | |
| class Rails < Thor | |
| desc "Open console via irb" | |
| def console(env = 'development') | |
| system("ruby script/console #{env}") | |
| end | |
| end | |
| __END__ | |
| % thor list | |
| rails | |
| ----- | |
| thor rails:console ENV = "development" # Open console via irb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment