Class: Gandiva::ExpressionBuilder::Elsif

Inherits:
If
  • Object
show all
Defined in:
lib/gandiva/expression-builder/elsif.rb

Instance Method Summary collapse

Methods inherited from If

#else, #elsif, #then

Constructor Details

#initialize(parent, condition) ⇒ Elsif

Returns a new instance of Elsif.



23
24
25
26
# File 'lib/gandiva/expression-builder/elsif.rb', line 23

def initialize(parent, condition)
  @parent = parent
  super(condition)
end

Instance Method Details

#buildObject



28
29
30
31
32
33
# File 'lib/gandiva/expression-builder/elsif.rb', line 28

def build
  elsif_node = super
  build_if_node(@parent.condition_node,
                @parent.then_node,
                elsif_node)
end