Class: Nasl::Increment
Instance Attribute Summary collapse
-
#ident ⇒ Object
readonly
Returns the value of attribute ident.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(tree, *tokens) ⇒ Increment
constructor
A new instance of Increment.
Methods inherited from Node
Constructor Details
#initialize(tree, *tokens) ⇒ Increment
Returns a new instance of Increment.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/nasl/parser/increment.rb', line 33 def initialize(tree, *tokens) super if @tokens.first.is_a? Lvalue @type = :post @ident = @tokens[0] else @type = :pre @ident = @tokens[1] end @children << :ident @children << :type end |
Instance Attribute Details
#ident ⇒ Object (readonly)
Returns the value of attribute ident.
31 32 33 |
# File 'lib/nasl/parser/increment.rb', line 31 def ident @ident end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
31 32 33 |
# File 'lib/nasl/parser/increment.rb', line 31 def type @type end |