Class: Substation::Processor::Evaluator

Inherits:
Object
  • Object
show all
Includes:
AbstractType
Defined in:
lib/substation/processor/evaluator.rb,
lib/substation/processor/evaluator/result.rb,
lib/substation/processor/evaluator/handler.rb

Overview

Abstract processor to evaluate a request coming into a chain

Direct Known Subclasses

Pivot, Request

Defined Under Namespace

Modules: Handler Classes: Pivot, Request, Result

Instance Method Summary collapse

Instance Method Details

#call(request) ⇒ Response

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Evaluate a chain's request input data

Parameters:

  • request (Request)

    the request to process

Returns:


46
47
48
49
50
51
52
53
# File 'lib/substation/processor/evaluator.rb', line 46

def call(request)
  result = invoke(decompose(request))
  if result.success?
    on_success(request, result)
  else
    on_failure(request, result)
  end
end