Module: OptionParser::Subcommand

Included in:
OptionParser
Defined in:
lib/cl/magic/common/sub_command.rb

Instance Method Summary collapse

Instance Method Details

#subcommand(key, &block) ⇒ Object



7
8
9
10
# File 'lib/cl/magic/common/sub_command.rb', line 7

def subcommand(key, &block)
  subcommand = lambda { OptionParser.new(&block) }
  subcommands[key.to_s] = subcommand
end