Sha256: 949ad87d8032675abb61a3ff42f462d77379723792bf6fcdd09df8139e75644d

Contents?: true

Size: 410 Bytes

Versions: 5

Compression:

Stored size: 410 Bytes

Contents

# frozen_string_literal: true

require 'dry/transaction/operation'
require 'pg_export/import'

class PgExport
  module Operations
    class OpenConnection
      include Dry::Transaction::Operation
      include Import['factories.gateway_factory']

      def call(inputs)
        gateway = gateway_factory.gateway
        gateway.open
        Success(inputs.merge(gateway: gateway))
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pg_export-1.0.0.rc5 lib/pg_export/lib/pg_export/operations/open_connection.rb
pg_export-1.0.0.rc4 lib/pg_export/lib/pg_export/operations/open_connection.rb
pg_export-1.0.0.rc3 lib/pg_export/lib/pg_export/operations/open_connection.rb
pg_export-1.0.0.rc2 lib/pg_export/lib/pg_export/operations/open_connection.rb
pg_export-1.0.0.rc1 lib/pg_export/lib/pg_export/operations/open_connection.rb