class Shoulda::Matchers::ActiveRecord::ValidateUniquenessOfMatcher::AttributeSetters

@private

def +(other_attribute_setters)

def +(other_attribute_setters)
  dup.tap do |attribute_setters|
    other_attribute_setters.each do |attribute_setter|
      attribute_setters << attribute_setter
    end
  end
end

def <<(given_attribute_setter)

def <<(given_attribute_setter)
  index = find_index_of(given_attribute_setter)
  if index
    @attribute_setters[index] = given_attribute_setter
  else
    @attribute_setters << given_attribute_setter
  end
end

def each(&block)

def each(&block)
  @attribute_setters.each(&block)
end

def find_index_of(given_attribute_setter)

def find_index_of(given_attribute_setter)
  @attribute_setters.find_index do |attribute_setter|
    attribute_setter.attribute_name ==
      given_attribute_setter.attribute_name
  end
end

def initialize

def initialize
  @attribute_setters = []
end

def last

def last
  @attribute_setters.last
end