Class: Nasl::Case
Instance Attribute Summary collapse
-
#case_op ⇒ Object
readonly
Returns the value of attribute case_op.
-
#case_type ⇒ Object
readonly
Returns the value of attribute case_type.
-
#case_val ⇒ Object
readonly
Returns the value of attribute case_val.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(tree, *tokens) ⇒ Case
constructor
A new instance of Case.
Methods inherited from Node
Constructor Details
#initialize(tree, *tokens) ⇒ Case
Returns a new instance of Case.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/nasl/parser/case.rb', line 33 def initialize(tree, *tokens) super if @tokens.length == 3 @case_op = nil @case_val = @tokens[1] @case_type = 'normal' elsif @tokens.length == 6 @case_op = @tokens[2] @case_val = @tokens[4] @case_type = 'normal_with_op' else @case_op = nil @case_val = nil @case_type = 'default' end @children << :case_val @children << :case_op @children << :case_type end |
Instance Attribute Details
#case_op ⇒ Object (readonly)
Returns the value of attribute case_op.
31 32 33 |
# File 'lib/nasl/parser/case.rb', line 31 def case_op @case_op end |
#case_type ⇒ Object (readonly)
Returns the value of attribute case_type.
31 32 33 |
# File 'lib/nasl/parser/case.rb', line 31 def case_type @case_type end |
#case_val ⇒ Object (readonly)
Returns the value of attribute case_val.
31 32 33 |
# File 'lib/nasl/parser/case.rb', line 31 def case_val @case_val end |