Class: RDG::Control::When
Instance Method Summary
collapse
#analyse
#initialize, register_analyser, register_default_analyser
Instance Method Details
#internal_flow_edges ⇒ Object
12
13
14
|
# File 'lib/rdg/control/when.rb', line 12
def internal_flow_edges
[[@test, @action]]
end
|
#prepare ⇒ Object
8
9
10
|
# File 'lib/rdg/control/when.rb', line 8
def prepare
@test, @action = children
end
|
#propogate_outgoing_flow ⇒ Object
20
21
22
23
24
|
# File 'lib/rdg/control/when.rb', line 20
def propogate_outgoing_flow
successors = graph.each_successor(@ast_node).to_a
graph.add_edge(@test, successors.first)
graph.add_edge(@action, successors.last)
end
|
#start_node ⇒ Object
16
17
18
|
# File 'lib/rdg/control/when.rb', line 16
def start_node
@test
end
|