Class: HashDealer::Hash
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
-
#initialize(optional_attributes = []) ⇒ Hash
constructor
A new instance of Hash.
- #to_hash ⇒ Object
Methods inherited from Hash
Constructor Details
#initialize(optional_attributes = []) ⇒ Hash
Returns a new instance of Hash.
4 5 6 |
# File 'lib/hash.rb', line 4 def initialize(optional_attributes = []) @optional_attributes = optional_attributes end |
Instance Method Details
#eql?(other) ⇒ Boolean
8 9 10 11 12 13 |
# File 'lib/hash.rb', line 8 def eql?(other) self_for_comparison = self.remove_optional_keys(self) other_for_comparison = self.remove_optional_keys(other) self_for_comparison.eql?(other_for_comparison) end |