Sha256: fb2f732a20ebf80445471e7f979ec38f304d93e5174b79a48236054a450ddf18

Contents?: true

Size: 836 Bytes

Versions: 1

Compression:

Stored size: 836 Bytes

Contents

module Flows
  class Flow
    # @abstract
    #
    # Node router: defines rules to calculate next {Node} to execute inside a particular {Flow}.
    #
    # Router receives {Flows::Result} Object, execution context and execution metadata.
    # Basing on this information a router must decide what to execute next or
    # decide to stop execution of a flow.
    #
    # If router returns `:end` - it stops an execution process.
    #
    # @!method call( result )
    #   @abstract
    #   @param result [Flows::Result] Result Object, output of a {Node} execution.
    #   @return [Symbol] name of the next node or  a special symbol `:end`.
    #   @raise [NoRouteError] if cannot determine a route.
    class Router
    end
  end
end

require_relative 'router/errors'
require_relative 'router/simple'
require_relative 'router/custom'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flows-0.4.0 lib/flows/flow/router.rb