Method: Constraint::OrConstraint#evaluate

Defined in:
lib/constraint.rb

#evaluate(invoker, object) ⇒ Object



59
60
61
62
63
64
65
66
67
68
69
# File 'lib/constraint.rb', line 59

def evaluate(invoker, object)
    c = nil
    for o in self
        begin
            return o.evaluate(invoker, object)
        rescue Constraint::Violation => e
            c = e
        end
    end
    raise c
end