Sha256: 581077a7e1633da6d351e42ca131903ed5eeb747301f2fce8aa604c210db96b6
Contents?: true
Size: 360 Bytes
Versions: 3
Compression:
Stored size: 360 Bytes
Contents
module PoolParty class Optioner # Parse the command line options for options without a switch def self.parse(argv, safe=[]) args = [] argv.each_with_index do |arg,i| unless arg.index("-") args << arg else argv.delete_at(i+1) unless safe.include?(arg) end end args end end end
Version data entries
3 entries across 3 versions & 3 rubygems
Version | Path |
---|---|
auser-poolparty-0.0.8 | lib/poolparty/optioner.rb |
dreadpiratepj-poolparty-0.0.8 | lib/poolparty/optioner.rb |
poolparty-0.0.4 | lib/pool_party/optioner.rb |