Sha256: 3d000b9d46f022b17129798b86bcde2eecd49dbe9c1698e46dca0363b91dc838

Contents?: true

Size: 482 Bytes

Versions: 2

Compression:

Stored size: 482 Bytes

Contents

require 'ronin/web/extensions/hpricot/container'

require 'hpricot'

module Hpricot
  class Elem

    include Comparable

    #
    # Returns +true+ if the element has the same starting-tag and
    # ending-tag as the _other_ element, returns +false+ otherwise.
    #
    def eql?(other)
      return false unless self.class == other.class

      return (stag == other.stag && etag == other.etag)
    end

    def ==(other)
      self.eql?(other) && super(other)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ronin-0.1.2 lib/ronin/web/extensions/hpricot/elem.rb
ronin-0.1.3 lib/ronin/web/extensions/hpricot/elem.rb