constrain 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/constrain/version.rb +1 -1
- data/lib/constrain.rb +4 -4
- 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: 8ec4473a304dbeea511cd266bf86ff8fef76ec741e8468e11cdd4e2edeef4e14
|
4
|
+
data.tar.gz: e2480805e2ec20618f6481b3d2ad93403c32fd8f24fa13235ea78a6c0988b2b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '008a22edd572ca9055f8dc6867f1e189e0ad86556aa0ab40307a801fd7e40ec9b085f85acb9dbd03c458035271afea3759bddf5b7c82bfd15ce1d8c7f555a39e'
|
7
|
+
data.tar.gz: 0fc82f5bc744e45d0e972a77639a24731a94498c490cfae3e6baf525ee321ce52496d10c88f50e0ae0621c63b64fd8c3fe7b80e2abb5c0b536de83b0146b292f
|
data/lib/constrain/version.rb
CHANGED
data/lib/constrain.rb
CHANGED
@@ -22,8 +22,8 @@ module Constrain
|
|
22
22
|
|
23
23
|
# Like #constrain but returns true/false to indicate the result instead of
|
24
24
|
# raising an exception
|
25
|
-
def constrain?(value,
|
26
|
-
Constrain.do_constrain?(value,
|
25
|
+
def constrain?(value, *exprs)
|
26
|
+
Constrain.do_constrain?(value, *exprs)
|
27
27
|
end
|
28
28
|
|
29
29
|
# :call-seq:
|
@@ -40,8 +40,8 @@ module Constrain
|
|
40
40
|
|
41
41
|
# Return true if the value matches the class expression. Raises a
|
42
42
|
# Constrain::Error if the expression is invalid
|
43
|
-
def self.constrain?(value,
|
44
|
-
do_constrain?(value,
|
43
|
+
def self.constrain?(value, *exprs)
|
44
|
+
do_constrain?(value, *exprs)
|
45
45
|
end
|
46
46
|
|
47
47
|
module ClassMethods
|