Class: Rubex::AST::Statement::IfBlock::Elsif
- Includes:
- Helper
- Defined in:
- lib/rubex/ast/statement/if_block/elsif.rb
Instance Attribute Summary collapse
-
#expr ⇒ Object
readonly
Returns the value of attribute expr.
-
#if_tail ⇒ Object
readonly
Returns the value of attribute if_tail.
-
#statements ⇒ Object
readonly
Returns the value of attribute statements.
Attributes inherited from Base
Instance Method Summary collapse
- #generate_code(code, local_scope) ⇒ Object
-
#initialize(expr, statements, if_tail, location) ⇒ Elsif
constructor
A new instance of Elsif.
Methods included from Helper
#analyse_statement, #generate_code_for_statement
Methods inherited from Base
Constructor Details
#initialize(expr, statements, if_tail, location) ⇒ Elsif
Returns a new instance of Elsif.
10 11 12 13 14 15 |
# File 'lib/rubex/ast/statement/if_block/elsif.rb', line 10 def initialize(expr, statements, if_tail, location) super(location) @expr = expr @statements = statements @if_tail = if_tail end |
Instance Attribute Details
#expr ⇒ Object (readonly)
Returns the value of attribute expr.
7 8 9 |
# File 'lib/rubex/ast/statement/if_block/elsif.rb', line 7 def expr @expr end |
#if_tail ⇒ Object (readonly)
Returns the value of attribute if_tail.
7 8 9 |
# File 'lib/rubex/ast/statement/if_block/elsif.rb', line 7 def if_tail @if_tail end |
#statements ⇒ Object (readonly)
Returns the value of attribute statements.
7 8 9 |
# File 'lib/rubex/ast/statement/if_block/elsif.rb', line 7 def statements @statements end |
Instance Method Details
#generate_code(code, local_scope) ⇒ Object
17 |
# File 'lib/rubex/ast/statement/if_block/elsif.rb', line 17 def generate_code(code, local_scope); end |