Class: Rubex::AST::Statement::IfBlock::Elsif

Inherits:
Base
  • Object
show all
Includes:
Helper
Defined in:
lib/rubex/ast/statement/if_block/elsif.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#location

Instance Method Summary collapse

Methods included from Helper

#analyse_statement, #generate_code_for_statement

Methods inherited from Base

#==, #statement?

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

#exprObject (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_tailObject (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

#statementsObject (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