Class: UseCase::ExecutionOrder

Inherits:
Object
  • Object
show all
Defined in:
lib/usecasing/execution_order.rb

Class Method Summary collapse

Class Method Details

.run(start_node) ⇒ Object

Raises:

  • (StandardError)


5
6
7
8
9
# File 'lib/usecasing/execution_order.rb', line 5

def self.run(start_node)
  any_ciclic, ciclic = CyclicFinder.new(start_node).cyclic?
  raise StandardError.new("cyclic detected: #{ciclic}") if any_ciclic
  post_order(start_node, [])
end