Method: Cmdlib::Command#addopt

Defined in:
lib/cmdlib/command.rb

#addopt(opt) ⇒ Object

Raises:

  • (TypeError)


31
32
33
34
35
36
# File 'lib/cmdlib/command.rb', line 31

def addopt ( opt )
  raise TypeError, 'Incorrectly types for option object.' unless
  opt.instance_of? Cmdlib::Option
  
  @options[opt.longname.to_sym] = opt
end