methods=Kernel/i.getopts.getopts
sublibraries=
requires=
classes=
is_sublibrary=false

ץϤ$OPT_xxx ͤꤷޤ

ŵŪʻȤϰʲΤ褦ˤʤޤ

  require 'getopts'
  
  unless getopts('vh', 'version', 'help')
    abort "usage: #$0 [-vh] [--version] [--help] file"
  end
  
  if $OPT_v or $OPT_version
    puts VERSION_STRING
    exit
  end
  
  # ARGV 饪ץϼ롣
  
  while line = ARGF.gets
    # ...
  end

Note: Ruby 1.8.2 ʹߤǤϡgetopts Ͽ侩ޤ
βϤˤϡ[[lib:optparse]] 侩ޤ

Author: <jammy@shljapan.co.jp>
