Class: WhirledPeas::Command::Help
- Inherits:
-
Base
- Object
- Base
- WhirledPeas::Command::Help
- Defined in:
- lib/whirled_peas/command/help.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.description ⇒ Object
6 7 8 |
# File 'lib/whirled_peas/command/help.rb', line 6 def self.description 'Show detailed help for a command' end |
Instance Method Details
#start ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/whirled_peas/command/help.rb', line 10 def start class_name = cmd.split('_').map(&:capitalize).join klass = Command.const_get(class_name) klass.print_usage rescue NameError puts "Unrecognized command: #{cmd}" exit(1) end |