Class: Nasl::Block

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

Returns a new instance of Block.



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

def initialize(tree, *tokens)
  super

  @body = if @tokens.length == 3 then @tokens[1] else [] end

  @attributes << :body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



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

def body
  @body
end