Module: Rodish::Plugins::Usages::ProcessorMethods
- Defined in:
- lib/rodish/plugins/usages.rb
Instance Method Summary collapse
-
#usages ⇒ Object
Return a hash of usage strings for the root command and all subcommands, recursively.
Instance Method Details
#usages ⇒ Object
Return a hash of usage strings for the root command and all subcommands, recursively. The hash has string keys for the command name, and string values for the help for the command.
15 16 17 18 19 20 21 22 23 |
# File 'lib/rodish/plugins/usages.rb', line 15 def usages usages = {} command.each_subcommand do |names, command| usages[names.join(" ")] = command.help end usages end |