getopts(*args)
Instance Public methods
Substitution of getopts is possible as follows. Also see OptionParser#getopts.
1 2 3 4 5 6 | def getopts(*args) ( $OPT = ARGV .getopts(*args)). each do |opt, val| eval "$OPT_#{opt.gsub(/[^A-Za-z0-9_]/, '_')} = val" end rescue OptionParser::ParseError end |
Please login to continue.