Module: Locomotive::RelationalAlgebra::Attribute::HashKeys
- Included in:
- Locomotive::RelationalAlgebra::Attribute
- Defined in:
- lib/locomotive/relational_algebra/attributes.rb
Instance Method Summary collapse
-
#eql?(other) ⇒ Boolean
We want to use attributes as keys for a hash-object, so we have to overwrite the eql?- and hash-method to make it work.
- #hash ⇒ Object
Instance Method Details
#eql?(other) ⇒ Boolean
We want to use attributes as keys for a hash-object, so we have to overwrite the eql?- and hash-method to make it work
137 138 139 |
# File 'lib/locomotive/relational_algebra/attributes.rb', line 137 def eql?(other) self.==(other) end |
#hash ⇒ Object
142 143 144 145 146 |
# File 'lib/locomotive/relational_algebra/attributes.rb', line 142 def hash # not the best algorithm for calculating a # hash but it works quite well self.class.object_id + name.object_id end |