Class: DeepCover::Node::Rescue
- Inherits:
-
DeepCover::Node
- Object
- DeepCover::Node
- DeepCover::Node::Rescue
- Defined in:
- lib/deep_cover/node/exceptions.rb
Constant Summary
Constants inherited from DeepCover::Node
CLASSES, Complex, Cvasgn, Dsym, Erange, Float, Int, Ivar, Kwarg, Kwoptarg, Kwrestarg, OrAsgn, Rational, Sym, True, Zsuper
Instance Attribute Summary
Attributes inherited from DeepCover::Node
#base_node, #children, #index, #next_sibling, #parent, #previous_sibling
Instance Method Summary collapse
- #execution_count ⇒ Object
- #flow_completion_count ⇒ Object
- #is_statement ⇒ Object
- #resbodies_flow_entry_count(child) ⇒ Object
Methods inherited from DeepCover::Node
[], #[], atom, #children_nodes, #covered_code, define_module_class, #each_node, #fancy_type, #find_all, has_evaluated_segments, inherited, #initialize, #simple_literal?, #to_s, #type
Methods included from Memoize
Constructor Details
This class inherits a constructor from DeepCover::Node
Instance Method Details
#execution_count ⇒ Object
46 47 48 |
# File 'lib/deep_cover/node/exceptions.rb', line 46 def execution_count watched_body.flow_completion_count end |
#flow_completion_count ⇒ Object
42 43 44 |
# File 'lib/deep_cover/node/exceptions.rb', line 42 def flow_completion_count resbodies.map(&:flow_completion_count).inject(0, :+) + self.else.flow_completion_count end |
#is_statement ⇒ Object
38 39 40 |
# File 'lib/deep_cover/node/exceptions.rb', line 38 def is_statement false end |
#resbodies_flow_entry_count(child) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/deep_cover/node/exceptions.rb', line 50 def resbodies_flow_entry_count(child) prev = child.previous_sibling if prev.equal? watched_body prev.flow_entry_count - prev.flow_completion_count else # RESBODIES if prev.exception # rubocop:disable Style/IfInsideElse prev.exception.flow_completion_count - prev.execution_count else prev.flow_entry_count - prev.execution_count end end end |