applix
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"] }
Activity
- Latest release
- 11y ago
- Total releases
- 22
- Cadence
- ~6 days
- Last 12 months
- 0
Details
- First release
- Nov 14, 2009
| Version | Released | |
|---|---|---|
0.4.14
patch
| ||
0.4.12
patch
| ||
0.4.13
patch
| ||
0.4.11
patch
| ||
0.4.10
patch
| ||
0.4.9
patch
| ||
0.4.8
patch
| ||
0.4.7
patch
| ||
0.4.5
patch
| ||
0.4.6
patch
| ||
0.4.4
patch
| ||
0.4.3
patch
| ||
0.4.2
minor
| ||
0.3.8
patch
| ||
0.3.7
patch
| ||
0.3.6
patch
| ||
0.3.5
patch
| ||
0.3.4
patch
| ||
0.3.0
minor
| ||
0.2.2
patch
| ||
0.2.1
patch
| ||
0.2.0
initial
|