Module: Arachni::Element::Capabilities::WithNode
- Included in:
- Auditable::DOM, WithDOM, Form, Link, LinkTemplate
- Defined in:
- lib/arachni/element/capabilities/with_node.rb
Overview
Instance Attribute Summary collapse
-
#html ⇒ String
HTML code for the element.
Instance Method Summary collapse
Instance Attribute Details
#html ⇒ String
Returns HTML code for the element.
17 18 19 |
# File 'lib/arachni/element/capabilities/with_node.rb', line 17 def html @html end |
Instance Method Details
#dup ⇒ Object
38 39 40 |
# File 'lib/arachni/element/capabilities/with_node.rb', line 38 def dup copy_with_node( super ) end |
#initialize(options) ⇒ Object
19 20 21 22 |
# File 'lib/arachni/element/capabilities/with_node.rb', line 19 def initialize( ) super self.html = [:html].freeze end |
#node ⇒ Nokogiri::XML::Element
29 30 31 32 |
# File 'lib/arachni/element/capabilities/with_node.rb', line 29 def node return if !@html Nokogiri::HTML.fragment( @html.dup ).children.first end |
#to_h ⇒ Object
34 35 36 |
# File 'lib/arachni/element/capabilities/with_node.rb', line 34 def to_h super.merge( html: html ) end |