Module: Pressy::Command::ClassMethods
- Defined in:
- lib/pressy/command.rb
Instance Method Summary collapse
Instance Method Details
#option(long_name, short_name) ⇒ Object
41 42 43 44 |
# File 'lib/pressy/command.rb', line 41 def option(long_name, short_name) @options ||= [] @options << { key: long_name, long: long_name, short: short_name } end |
#parse!(args) ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/pressy/command.rb', line 46 def parse!(args) = {} OptionParser.new do |parser| (parser, ) end.parse!(args) end |