Class: Nasl::Identifier
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(tree, *tokens) ⇒ Identifier
constructor
A new instance of Identifier.
- #to_xml(xml) ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(tree, *tokens) ⇒ Identifier
Returns a new instance of Identifier.
33 34 35 36 37 |
# File 'lib/nasl/parser/identifier.rb', line 33 def initialize(tree, *tokens) super @name = @tokens.first.body end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
31 32 33 |
# File 'lib/nasl/parser/identifier.rb', line 31 def name @name end |
Instance Method Details
#to_xml(xml) ⇒ Object
39 40 41 |
# File 'lib/nasl/parser/identifier.rb', line 39 def to_xml(xml) xml.identifier(:name=>@name) end |