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