Sha256: 35779cd3ff8125d54cb51d18489011fdab68fd7f728816d5b1b367820310dc71
Contents?: true
Size: 359 Bytes
Versions: 5
Compression:
Stored size: 359 Bytes
Contents
# coding: utf-8 # module Githelp def params(argv=ARGV) a = [] argv.each { |arg| if arg =~ /^(\d+)[^\d]*$/ then # a << $1 elsif arg =~ /^'.*'$/ || arg =~ /^".*"$/ || arg =~ /^「.*」$/ a << arg.sub(/^['"]/,'').sub(/['"]$/,'').sub('「','').sub('」','') end } a.length > 0 ? a : ['##DUMMYNAME##'] end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
githelp-0.1.4 | lib/githelp/params.rb |
githelp-0.1.3 | lib/githelp/params.rb |
githelp-0.1.2 | lib/githelp/params.rb |
githelp-0.1.1 | lib/githelp/params.rb |
githelp-0.1.0 | lib/githelp/params.rb |