lib/epub/publication/package/spine.rb in epub-parser-0.1.0 vs lib/epub/publication/package/spine.rb in epub-parser-0.1.1

- old
+ new

@@ -38,9 +38,15 @@ # @return [Package::Manifest::Item] item referred by this object def item @item ||= @spine.package.manifest[idref] end + + def ==(other) + [:spine, :idref, :linear, :id].all? {|meth| + self.__send__(meth) == other.__send__(meth) + } and (other.properties - properties).empty? + end end end end end end