Sha256: e1e6d0f21d8af6a3fe00e9c5c3808dd2fa92bc945638a304d5037993d489a427
Contents?: true
Size: 474 Bytes
Versions: 8
Compression:
Stored size: 474 Bytes
Contents
require 'optparse' module CliApp class <<self def run OptionParser.new do |opts| opts.banner = "Usage: cli.rb [options]\nCommand line test app." opts.on( "--option OPTIONIAL", "run with OPTIONIAL") do |option| puts option end opts.on_tail("-h", "--help", "show help") do puts opts #exit NB! end end.parse! end end end if $0 == __FILE__ CliApp.run end
Version data entries
8 entries across 8 versions & 2 rubygems