Class: Nasl::KeyValuePair
- Defined in:
- lib/nasl/parser/key_value_pair.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(tree, *tokens) ⇒ KeyValuePair
constructor
A new instance of KeyValuePair.
Methods inherited from Node
Constructor Details
#initialize(tree, *tokens) ⇒ KeyValuePair
Returns a new instance of KeyValuePair.
33 34 35 36 37 38 39 40 41 |
# File 'lib/nasl/parser/key_value_pair.rb', line 33 def initialize(tree, *tokens) super @key = tokens[0] @value = tokens[2] @children << :key @children << :value end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
31 32 33 |
# File 'lib/nasl/parser/key_value_pair.rb', line 31 def key @key end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
31 32 33 |
# File 'lib/nasl/parser/key_value_pair.rb', line 31 def value @value end |