Sha256: 3e9eeb506efa461e6c6227fdde085ceb23cc3624b0f5ac49015ef972fd439398

Contents?: true

Size: 370 Bytes

Versions: 1

Compression:

Stored size: 370 Bytes

Contents

$:.unshift File.expand_path '../lib', File.dirname(__FILE__)

require 'args_parser'

args = ArgsParser.parse ARGV, :style => :equal do
  arg :help, 'show help', :alias => :h

  on :help do |v|
    STDERR.puts help
    STDERR.puts "e.g.  ruby equal_style.rb --user=shokai hello world  --a=1234"
    exit 1
  end
end

puts "== args"
p args
puts "== args.argv"
p args.argv

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
args_parser-0.2.0 samples/equal_style.rb