class Nasl::String

Attributes

text[R]
type[R]

Public Class Methods

new(tree, *tokens) click to toggle source
Calls superclass method Nasl::Node::new
# File lib/nasl/parser/string.rb, line 34
def initialize(tree, *tokens)
  super

  @text = @tokens.first.body
  @type = @tokens.first.type
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/nasl/parser/string.rb, line 41
def <=>(other)
  self.text <=> other.text
end
to_xml(xml) click to toggle source
# File lib/nasl/parser/string.rb, line 45
def to_xml(xml)
  xml.method_missing(@type.downcase, @text)
end