Class: Nasl::Repetition

Inherits:
Node
  • Object
show all
Defined in:
lib/nasl/parser/repetition.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#ctx, #tokens

Instance Method Summary collapse

Methods inherited from Node

#context, #region, #to_xml

Constructor Details

#initialize(tree, *tokens) ⇒ Repetition

Returns a new instance of Repetition.



33
34
35
36
37
38
39
40
41
# File 'lib/nasl/parser/repetition.rb', line 33

def initialize(tree, *tokens)
  super

  @call = tokens[0]
  @expr = tokens[2]

  @children << :call
  @children << :expr
end

Instance Attribute Details

#callObject (readonly)

Returns the value of attribute call.



31
32
33
# File 'lib/nasl/parser/repetition.rb', line 31

def call
  @call
end

#exprObject (readonly)

Returns the value of attribute expr.



31
32
33
# File 'lib/nasl/parser/repetition.rb', line 31

def expr
  @expr
end