Class: Rucoa::Nodes::IfNode
Instance Method Summary
collapse
#modifier?
Methods inherited from Base
#ancestors, #child_nodes, #descendant_nodes, #each_ancestor, #each_child_node, #each_descendant_node, #include_position?, #initialize, #module_nesting, #namespace, #next_sibling_nodes, #parent, #parent=, #previous_sibling_nodes, #updated
Instance Method Details
9
10
11
|
# File 'lib/rucoa/nodes/if_node.rb', line 9
def branch_else
children[2]
end
|
14
15
16
|
# File 'lib/rucoa/nodes/if_node.rb', line 14
def branch_if
children[1]
end
|
19
20
21
|
# File 'lib/rucoa/nodes/if_node.rb', line 19
def condition
children[0]
end
|
24
25
26
|
# File 'lib/rucoa/nodes/if_node.rb', line 24
def elsif
branch_else if branch_else.is_a?(Nodes::IfNode)
end
|
#elsif? ⇒ Boolean
29
30
31
|
# File 'lib/rucoa/nodes/if_node.rb', line 29
def elsif?
parent.is_a?(Nodes::IfNode) && equal?(parent.elsif)
end
|