RubyGems Navigation menu

applix 0.4.11

ApplixHash#from_argv builds hashes from ARGV like argument vectors according to following examples: '-f' --> { :f => true } '--flag' --> { :flag => true } '--flag:false' --> { :flag => false } '--flag=false' --> { :flag => 'false' } '--option=value' --> { :option => "value" } '--int=1' --> { :int => "1" } '--float=2.3' --> { :float => "2.3" } '--float:2.3' --> { :float => 2.3 } '--txt="foo bar"' --> { :txt => "foo bar" } '--txt:'"foo bar"'' --> { :txt => "foo bar" } '--txt:%w{foo bar}' --> { :txt => ["foo", "bar"] } '--now:Time.now' --> { :now => #<Date: 3588595/2,0,2299161> } remaining arguments(non flag/options) are inserted as [:arguments, args], eg: Hash.from_argv %w(--foo --bar=loo 123 now) becomes { :foo => true, :bar => 'loo', :arguments => ["123", "now"] }

Versions:

  1. 0.4.11 - July 23, 2013 (13 KB)
  2. 0.4.10 - May 29, 2012 (11.5 KB)
  3. 0.4.9 - April 26, 2012 (11 KB)
  4. 0.4.8 - March 27, 2012 (10.5 KB)
  5. 0.4.7 - March 27, 2012 (10.5 KB)
Show all versions (19 total)

Runtime Dependencies:

Authors:

  • art+com/dirk luesebrink

Owners:

Eccad02bf8d4e74ebeed807022d38a9b

Total downloads 30,957

For this version 924

Show all versions (19 total)

Required Ruby Version: None

Licenses:

N/A

Gemfile:
gem 'applix', '~> 0.4.11' = Copy to clipboard Copied!

install:
gem install applix = Copy to clipboard Copied!

Links: