lib/constrain.rb in constrain-0.3.1 vs lib/constrain.rb in constrain-0.3.2

- old
+ new

@@ -20,12 +20,12 @@ Constrain.do_constrain(value, *exprs) end # Like #constrain but returns true/false to indicate the result instead of # raising an exception - def constrain?(value, expr) - Constrain.do_constrain?(value, expr) + def constrain?(value, *exprs) + Constrain.do_constrain?(value, *exprs) end # :call-seq: # constrain(value, *class-expressions, unwind: 0) # constrain(value, *values, unwind: 0) @@ -38,11 +38,11 @@ do_constrain(value, *exprs) end # Return true if the value matches the class expression. Raises a # Constrain::Error if the expression is invalid - def self.constrain?(value, expr) - do_constrain?(value, expr) + def self.constrain?(value, *exprs) + do_constrain?(value, *exprs) end module ClassMethods # See Constrain.constrain def constrain(*args) Constrain.do_constrain(*args) end