Module: Substation::Processor::Evaluator::Handler

Defined in:
lib/substation/processor/evaluator/handler.rb

Overview

Helps returning an api compatible result from custom Evaluator handlers

Instance Method Summary collapse

Instance Method Details

#error(output) ⇒ Result::Failure

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.

Return an errorneous result



30
31
32
# File 'lib/substation/processor/evaluator/handler.rb', line 30

def error(output)
  respond_with(Result::Failure, output)
end

#success(output) ⇒ Result::Success

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.

Return a successful result



18
19
20
# File 'lib/substation/processor/evaluator/handler.rb', line 18

def success(output)
  respond_with(Result::Success, output)
end