lib/dry/logic/rule/set.rb in dry-logic-0.2.3 vs lib/dry/logic/rule/set.rb in dry-logic-0.3.0
- old
+ new
@@ -5,11 +5,19 @@
def type
:set
end
+ def arity
+ -1
+ end
+
def apply(input)
rules.map { |rule| rule.(input) }
+ end
+
+ def curry(*args)
+ new(rules.map { |r| r.curry(*args) })
end
def at(*args)
new(rules.values_at(*args))
end