lab42_rgxargs 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lab42/rgxargs.rb +8 -0
- data/lib/lab42/rgxargs/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63983b6491bb1ce75a959a0bbf95c22d2146468ed7ea45c5281065d96b0c79ba
|
4
|
+
data.tar.gz: d70cbfbcd144f2d1fe639347592a80d3e3667f62ddb411dc1d3b9eb231492ee1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45318701acaf53c2afe7ee571d2a38af1743bedd3554c514c1a06512ad16c0cb7afed0a3cf427ff44e0c67f8bf75e7b21f63703c18ac892dea562b712cbccb7d
|
7
|
+
data.tar.gz: 19d9bf8c3d67f10a6848a368996717418eec67873141edc862d4a4cc1ece1703acddc041fa25393d05eaabc8fca77142d5c3213b99ffce0012d8e2d9d60556ff
|
data/lib/lab42/rgxargs.rb
CHANGED
@@ -55,6 +55,14 @@ module Lab42
|
|
55
55
|
end
|
56
56
|
|
57
57
|
|
58
|
+
def allows name, matcher=nil, &converter
|
59
|
+
add_conversion(name, matcher, &converter)
|
60
|
+
end
|
61
|
+
|
62
|
+
def needs name, matcher=nil, &converter
|
63
|
+
add_conversion(name, matcher, :required, &converter)
|
64
|
+
end
|
65
|
+
|
58
66
|
private
|
59
67
|
|
60
68
|
def initialize &blk
|