Method: Shomen::CLI::Abstract#parse
- Defined in:
- lib/shomen/cli/abstract.rb
#parse(argv, *choices) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/shomen/cli/abstract.rb', line 21 def parse(argv, *choices) = (Hash === choices.last ? choices.pop : {}) parser = OptionParser.new choices.each do |choice| send("option_#{choice}", parser, ) end option_debug(parser, ) option_warn(parser, ) option_help(parser, ) parser.parse!(argv) return end |