Class: Nasl::Comment
Instance Attribute Summary collapse
-
#next ⇒ Object
readonly
Returns the value of attribute next.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(tree, *tokens) ⇒ Comment
constructor
A new instance of Comment.
- #to_xml(xml) ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(tree, *tokens) ⇒ Comment
Returns a new instance of Comment.
33 34 35 36 37 38 39 40 |
# File 'lib/nasl/parser/comment.rb', line 33 def initialize(tree, *tokens) super @text = @tokens.first @next = @tokens.last @next = nil if @tokens.length == 1 end |
Instance Attribute Details
#next ⇒ Object (readonly)
Returns the value of attribute next.
31 32 33 |
# File 'lib/nasl/parser/comment.rb', line 31 def next @next end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
31 32 33 |
# File 'lib/nasl/parser/comment.rb', line 31 def text @text end |
Instance Method Details
#to_xml(xml) ⇒ Object
42 43 44 |
# File 'lib/nasl/parser/comment.rb', line 42 def to_xml(xml) xml.comment(@text) end |