Module: Facy::OptParser
- Included in:
- Facy
- Defined in:
- lib/facy/option_parser.rb
Instance Method Summary collapse
Instance Method Details
#parse(argv) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/facy/option_parser.rb', line 3 def parse(argv) OptionParser.new do |opt| # -h, --h, --help is show usage. # -v, --v, --version is show version. # short option with require argument opt.on('--debug_log VALUE') do |v| config[:debug_log] = v end opt.on('--enable_img_view VALUE') do |v| config[:enable_img_view] = v end opt.parse!(argv) end end |