Class: Nasl::For
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#cond ⇒ Object
readonly
Returns the value of attribute cond.
-
#each ⇒ Object
readonly
Returns the value of attribute each.
-
#init ⇒ Object
readonly
Returns the value of attribute init.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(tree, *tokens) ⇒ For
constructor
A new instance of For.
Methods inherited from Node
Constructor Details
#initialize(tree, *tokens) ⇒ For
Returns a new instance of For.
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/nasl/parser/for.rb', line 33 def initialize(tree, *tokens) super @init = @tokens[2] @cond = @tokens[4] @each = @tokens[6] @body = @tokens[8] @children << :init @children << :cond @children << :each @children << :body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
31 32 33 |
# File 'lib/nasl/parser/for.rb', line 31 def body @body end |
#cond ⇒ Object (readonly)
Returns the value of attribute cond.
31 32 33 |
# File 'lib/nasl/parser/for.rb', line 31 def cond @cond end |
#each ⇒ Object (readonly)
Returns the value of attribute each.
31 32 33 |
# File 'lib/nasl/parser/for.rb', line 31 def each @each end |
#init ⇒ Object (readonly)
Returns the value of attribute init.
31 32 33 |
# File 'lib/nasl/parser/for.rb', line 31 def init @init end |