Class: Necropsy::Reachability::Engine
- Inherits:
-
Object
- Object
- Necropsy::Reachability::Engine
- Defined in:
- lib/necropsy/reachability/engine.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(graph) ⇒ Engine
constructor
A new instance of Engine.
Constructor Details
#initialize(graph) ⇒ Engine
Returns a new instance of Engine.
8 9 10 |
# File 'lib/necropsy/reachability/engine.rb', line 8 def initialize(graph) @graph = graph end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/necropsy/reachability/engine.rb', line 12 def call runtime_roots = graph.entry_points.reject(&:test?).map(&:node_id) test_roots = graph.entry_points.select(&:test?).map(&:node_id) Result.new( runtime_alive: traverse(runtime_roots), test_alive: traverse(test_roots) ) end |