Class: SimplerDB::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/simplerdb/db.rb

Direct Known Subclasses

AttributeParam

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ Attribute

Returns a new instance of Attribute.



56
57
58
59
# File 'lib/simplerdb/db.rb', line 56

def initialize(name, value)
  @name = name
  @value = value
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



54
55
56
# File 'lib/simplerdb/db.rb', line 54

def name
  @name
end

#valueObject

Returns the value of attribute value.



54
55
56
# File 'lib/simplerdb/db.rb', line 54

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



61
62
63
# File 'lib/simplerdb/db.rb', line 61

def ==(other)
  @name == other.name && @value == other.value
end