Class: Nasl::Return
Instance Attribute Summary collapse
-
#expr ⇒ Object
readonly
Returns the value of attribute expr.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(tree, *tokens) ⇒ Return
constructor
A new instance of Return.
Methods inherited from Node
Constructor Details
#initialize(tree, *tokens) ⇒ Return
Returns a new instance of Return.
33 34 35 36 37 38 39 |
# File 'lib/nasl/parser/return.rb', line 33 def initialize(tree, *tokens) super @expr = if @tokens.length == 3 then @tokens[1] else nil end @children << :expr end |
Instance Attribute Details
#expr ⇒ Object (readonly)
Returns the value of attribute expr.
31 32 33 |
# File 'lib/nasl/parser/return.rb', line 31 def expr @expr end |