Class: Nasl::Parameter

Inherits:
Node
  • Object
show all
Defined in:
lib/nasl/parser/parameter.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) ⇒ Parameter

Returns a new instance of Parameter.



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

def initialize(tree, *tokens)
  super

  @name = @tokens[0]
  @pass_by = @tokens[1]

  @children << :name
  @children << :pass_by
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#pass_byObject (readonly)

Returns the value of attribute pass_by.



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

def pass_by
  @pass_by
end