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