Class: RubyReactor::Executor::GraphManager

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_reactor/executor/graph_manager.rb

Instance Method Summary collapse

Constructor Details

#initialize(reactor_class, dependency_graph, context) ⇒ GraphManager

Returns a new instance of GraphManager.



6
7
8
9
10
# File 'lib/ruby_reactor/executor/graph_manager.rb', line 6

def initialize(reactor_class, dependency_graph, context)
  @reactor_class = reactor_class
  @dependency_graph = dependency_graph
  @context = context
end

Instance Method Details

#build_and_validate!Object



12
13
14
15
# File 'lib/ruby_reactor/executor/graph_manager.rb', line 12

def build_and_validate!
  build_dependency_graph
  validate_graph!
end

#mark_completed_steps_from_contextObject



17
18
19
20
21
# File 'lib/ruby_reactor/executor/graph_manager.rb', line 17

def mark_completed_steps_from_context
  @context.intermediate_results.each_key do |step_name|
    @dependency_graph.complete_step(step_name)
  end
end