Class: Arachni::Parser::Document

Inherits:
Object
  • Object
show all
Includes:
WithChildren
Defined in:
lib/arachni/parser/document.rb

Instance Method Summary collapse

Methods included from WithChildren

#<<, #children, #text

Methods included from WithChildren::Search

#descendants, #nodes_by_attribute_name, #nodes_by_attribute_name_and_value, #nodes_by_class, #nodes_by_name, #nodes_by_names, #traverse

Instance Method Details

#nameObject



20
21
22
# File 'lib/arachni/parser/document.rb', line 20

def name
    :document
end

#to_html(indentation = 2, level = 0) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/arachni/parser/document.rb', line 24

def to_html( indentation = 2, level = 0 )
    html = "<!DOCTYPE html>\n"
    children.each do |child|
        html << child.to_html( indentation, level )
    end
    html << "\n"
end