Class: ClearObject::AttributeSet

Inherits:
Set
  • Object
show all
Defined in:
lib/clear_object/attribute_set.rb

Instance Method Summary collapse

Instance Method Details

#<<(attribute) ⇒ Object



3
4
5
6
7
# File 'lib/clear_object/attribute_set.rb', line 3

def <<(attribute)
  if none? { |member| member.name == attribute.name}
    add(attribute)
  end
end