lib/muflax/value.rb in muflax-0.2.1 vs lib/muflax/value.rb in muflax-0.2.2
- old
+ new
@@ -3,18 +3,19 @@
# Copyright Stefan Dorn <mail@muflax.com>, 2016
# License: GNU GPLv3 (or later) <http://www.gnu.org/copyleft/gpl.html>
class Value
def ==(other)
- eql?(other)
- end
-
- def eql?(other)
self.class == other.class && differences_with(other).empty?
end
+ alias :eql? :==
def inspect
- "#<#{self.class.name} #{self.class.attributes}>"
+ "#<#{self.class.name} #{to_h}>"
+ end
+
+ def hash
+ to_a.hash
end
def to_h
Hash[to_a]
end