lib/blather/xmpp_node.rb in blather-0.4.15 vs lib/blather/xmpp_node.rb in blather-0.4.16

- old
+ new

@@ -211,8 +211,16 @@ end def inspect self.to_xml end + + def eql?(o, *fields) + o.is_a?(self.class) && fields.all? { |f| self.__send__(f) == o.__send__(f) } + end + + def ==(o) + eql?(o) + end end # XMPPNode end # Blather