class Nasl::Block

Attributes

body[R]

Public Class Methods

new(tree, *tokens) click to toggle source
Calls superclass method
# File lib/nasl/parser/block.rb, line 35
def initialize(tree, *tokens)
  super

  if (@tokens.length == 4)
    @body = [@tokens[1]] + @tokens[2]
  elsif (@tokens.length == 3)
    @body = @tokens[1]
  else
    @body = []
  end

  @children << :body
end

Public Instance Methods

each() { |stmt| ... } click to toggle source
# File lib/nasl/parser/block.rb, line 49
def each
  @body.each{ |stmt| yield stmt }
end