Class: RDG::Control::RescueBody

Inherits:
Analysis::Propagater show all
Defined in:
lib/rdg/control/rescue_body.rb

Instance Method Summary collapse

Methods inherited from Analysis::Propagater

#analyse

Methods inherited from Analysis::Analyser

#initialize, register_analyser, register_default_analyser

Constructor Details

This class inherits a constructor from RDG::Analysis::Analyser

Instance Method Details

#end_nodesObject



20
21
22
# File 'lib/rdg/control/rescue_body.rb', line 20

def end_nodes
  @statements.last(1)
end

#internal_flow_edgesObject



12
13
14
# File 'lib/rdg/control/rescue_body.rb', line 12

def internal_flow_edges
  @statements.each_cons(2).to_a
end

#nodesObject



24
25
26
# File 'lib/rdg/control/rescue_body.rb', line 24

def nodes
  @statements
end

#prepareObject



8
9
10
# File 'lib/rdg/control/rescue_body.rb', line 8

def prepare
  _exception_types, _variable_name, *@statements = children
end

#start_nodeObject



16
17
18
# File 'lib/rdg/control/rescue_body.rb', line 16

def start_node
  @statements.first
end