Class: YADM::Criteria::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/yadm/criteria/attribute.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Attribute

Returns a new instance of Attribute.



6
7
8
# File 'lib/yadm/criteria/attribute.rb', line 6

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/yadm/criteria/attribute.rb', line 4

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



10
11
12
# File 'lib/yadm/criteria/attribute.rb', line 10

def ==(other)
  other.respond_to?(:name) && name == other.name
end