class Shoulda::Matchers::ActiveModel::AllowValueMatcher::AttributeSettersAndValidators
@private
def does_not_match?(tuple)
def does_not_match?(tuple) !matches?(tuple) end
def each(&block)
def each(&block) tuples.each(&block) end
def first_failing
def first_failing tuples.detect(&method(:does_not_match?)) end
def first_passing
def first_passing tuples.detect(&method(:matches?)) end
def initialize(allow_value_matcher, values)
def initialize(allow_value_matcher, values) @tuples = values.map do |attribute_name, value| AttributeSetterAndValidator.new( allow_value_matcher, attribute_name, value, ) end end
def matches?(tuple)
def matches?(tuple) tuple.attribute_setter.set! && tuple.validator.call end