Class: SimplerDB::Attribute
- Inherits:
-
Object
- Object
- SimplerDB::Attribute
- Defined in:
- lib/simplerdb/db.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name, value) ⇒ Attribute
constructor
A new instance of Attribute.
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
#name ⇒ Object
Returns the value of attribute name.
54 55 56 |
# File 'lib/simplerdb/db.rb', line 54 def name @name end |
#value ⇒ Object
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 |