Sha256: fae091d5070b520b2ad1a8411f0a348a918ae03bf070a97367791ba80ae6821e

Contents?: true

Size: 707 Bytes

Versions: 2

Compression:

Stored size: 707 Bytes

Contents

# frozen_string_literal: true

module Opera
  module Operation
    module Instructions
      module Executors
        class Operation < Executor
          def call(instruction)
            instruction[:kind] = :step
            operation_result = super

            if operation_result.success?
              add_instruction_output(instruction, operation_result.output)
              execution = result.executions.pop
              result.executions << { execution => operation_result.executions }
            else
              result.add_errors(operation_result.errors)
              result.add_exceptions(operation_result.exceptions)
            end
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
opera-0.1.1 lib/opera/operation/instructions/executors/operation.rb
opera-0.1.0 lib/opera/operation/instructions/executors/operation.rb