class Dry::Logic::Operations::Set
Public Instance Methods
[](input)
click to toggle source
# File lib/dry/logic/operations/set.rb, line 23 def [](input) rules.map { |rule| rule[input] }.all? end
ast(input = Undefined)
click to toggle source
# File lib/dry/logic/operations/set.rb, line 27 def ast(input = Undefined) [type, rules.map { |rule| rule.ast(input) }] end
call(input)
click to toggle source
# File lib/dry/logic/operations/set.rb, line 14 def call(input) results = rules.map { |rule| rule.(input) } success = results.all?(&:success?) Result.new(success, id) do [type, results.select(&:failure?).map { |failure| failure.to_ast }] end end
to_s()
click to toggle source
# File lib/dry/logic/operations/set.rb, line 31 def to_s "#{type}(#{rules.map(&:to_s).join(", ")})" end
type()
click to toggle source
# File lib/dry/logic/operations/set.rb, line 10 def type :set end