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)


8
9
10
11
12
# File 'lib/usecasing/execution_order.rb', line 8

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