Class: Arachni::Parser::Nodes::Text

Inherits:
Base show all
Includes:
WithValue
Defined in:
lib/arachni/parser/nodes/text.rb

Instance Attribute Summary

Attributes included from WithValue

#value

Attributes inherited from Base

#document, #parent

Instance Method Summary collapse

Methods included from WithValue

#initialize

Instance Method Details

#textObject



19
20
21
# File 'lib/arachni/parser/nodes/text.rb', line 19

def text
    @value.to_s
end

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



23
24
25
26
# File 'lib/arachni/parser/nodes/text.rb', line 23

def to_html( indentation = 2, level = 0 )
    indent = ' ' * (indentation * level)
    "#{indent}#{value}\n"
end