Module: Todo::Support::OptionsParser

Included in:
Cli::Cmd
Defined in:
lib/todo/support/options_parser.rb

Instance Method Summary collapse

Instance Method Details

#opt(*args, &block) ⇒ Object



6
7
8
# File 'lib/todo/support/options_parser.rb', line 6

def opt(*args, &block)
  rules << [args, block]
end

#parse(args) ⇒ Object



10
11
12
13
14
# File 'lib/todo/support/options_parser.rb', line 10

def parse(args)
  opts = {}
  args = parser(opts).parse(args)
  [args, opts]
end