Sha256: 4e06f2d5e6c415ff36ad38ae26ffcc167c0da16fc14161a3d69fd7d988c00aff

Contents?: true

Size: 826 Bytes

Versions: 6

Compression:

Stored size: 826 Bytes

Contents

=begin
    Copyright 2010-2014 Tasos Laskos <tasos.laskos@arachni-scanner.com>

    This file is part of the Arachni Framework project and is subject to
    redistribution and commercial restrictions. Please see the Arachni Framework
    web site for more information on licensing and terms of use.
=end

require_relative 'with_node'

module Arachni
module Element::Capabilities

# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
module WithDOM
    include WithNode

    # @return     [DOM]
    attr_accessor :dom

    # @return   [DOM]
    def dom
        @dom ||= self.class::DOM.new( parent: self )
    end

    def dup
        copy_with_dom( super )
    end

    private

    def copy_with_dom( other )
        other.dom = dom.dup.tap { |d| d.parent = other } if @dom
        other
    end

end

end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
arachni-1.0.5 lib/arachni/element/capabilities/with_dom.rb
arachni-1.0.4 lib/arachni/element/capabilities/with_dom.rb
arachni-1.0.3 lib/arachni/element/capabilities/with_dom.rb
arachni-1.0.2 lib/arachni/element/capabilities/with_dom.rb
arachni-1.0.1 lib/arachni/element/capabilities/with_dom.rb
arachni-1.0 lib/arachni/element/capabilities/with_dom.rb