Module: Arachni::Element::Capabilities::WithSource

Included in:
WithNode, Arachni::Element::Cookie, DOM, GenericDOM, JSON, NestedCookie, XML
Defined in:
lib/arachni/element/capabilities/with_source.rb

Overview

Author:

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

Defined Under Namespace

Classes: Error

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#sourceString

Returns Source for the element.

Returns:

  • (String)

    Source for the element.



22
23
24
# File 'lib/arachni/element/capabilities/with_source.rb', line 22

def source
  @source
end

Instance Method Details

#dupObject



41
42
43
# File 'lib/arachni/element/capabilities/with_source.rb', line 41

def dup
    copy_with_source( super )
end

#initialize(options) ⇒ Object



24
25
26
27
# File 'lib/arachni/element/capabilities/with_source.rb', line 24

def initialize( options )
    super
    self.source = options[:source]
end

#to_hObject



33
34
35
# File 'lib/arachni/element/capabilities/with_source.rb', line 33

def to_h
    super.merge( source: source )
end

#to_rpc_dataObject



37
38
39
# File 'lib/arachni/element/capabilities/with_source.rb', line 37

def to_rpc_data
    super.merge( 'source' => @source )
end