Class: ElseifNode

Inherits:
Node
  • Object
show all
Defined in:
lib/nodes/stmtnodes.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#value

Instance Method Summary collapse

Methods inherited from Node

#to_s

Constructor Details

#initialize(argument, node) ⇒ ElseifNode

Returns a new instance of ElseifNode.



119
120
121
# File 'lib/nodes/stmtnodes.rb', line 119

def initialize(argument, node)
  @argument, @node = argument, node
end

Instance Attribute Details

#argumentObject

Returns the value of attribute argument.



117
118
119
# File 'lib/nodes/stmtnodes.rb', line 117

def argument
  @argument
end

Instance Method Details

#evaluateObject



123
124
125
# File 'lib/nodes/stmtnodes.rb', line 123

def evaluate
  @value = @node.evaluate
end