Class: Lono::Command
- Inherits:
-
Thor
- Object
- Thor
- Lono::Command
- Defined in:
- lib/lono/command.rb
Class Method Summary collapse
Class Method Details
.dispatch(m, args, options, config) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/lono/command.rb', line 5 def dispatch(m, args, , config) # Allow calling for help via: # lono generate help # lono generate -h # lono generate --help # lono generate -D # # as well thor's nomral setting as # # lono help generate help_flags = Thor::HELP_MAPPINGS + ["help"] if args.length > 1 && !(args & help_flags).empty? args -= help_flags args.insert(-2, "help") end super end |