Sha256: bec53394361a7b9133ee1fd7812992aac8588a08d30895d9936473b7a651abeb
Contents?: true
Size: 375 Bytes
Versions: 13
Compression:
Stored size: 375 Bytes
Contents
require 'optparse' parser = OptionParser.new def xxx_handler(value) p ['Handler method for -xxx called with value:', value] end parser.on('--xxx', 'Option with no argument', method(:xxx_handler)) def yyy_handler(value) p ['Handler method for -yyy called with value:', value] end parser.on('--yyy YYY', 'Option with required argument', method(:yyy_handler)) parser.parse!
Version data entries
13 entries across 13 versions & 3 rubygems