module Arachni::Element::Capabilities::WithSource

@author Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>

Attributes

source[RW]

@return [String]

Source for the element.

Public Class Methods

new( options ) click to toggle source
Calls superclass method
# File lib/arachni/element/capabilities/with_source.rb, line 24
def initialize( options )
    super
    self.source = options[:source]
end

Public Instance Methods

dup() click to toggle source
Calls superclass method
# File lib/arachni/element/capabilities/with_source.rb, line 41
def dup
    copy_with_source( super )
end
source=( s ) click to toggle source
# File lib/arachni/element/capabilities/with_source.rb, line 29
def source=( s )
    @source = (s ? s.strip : s.freeze )
end
to_h() click to toggle source
Calls superclass method
# File lib/arachni/element/capabilities/with_source.rb, line 33
def to_h
    super.merge( source: source )
end
to_rpc_data() click to toggle source
Calls superclass method
# File lib/arachni/element/capabilities/with_source.rb, line 37
def to_rpc_data
    super.merge( 'source' => @source )
end

Private Instance Methods

copy_with_source( other ) click to toggle source
# File lib/arachni/element/capabilities/with_source.rb, line 47
def copy_with_source( other )
    other.source = @source
    other
end