Sha256: 734ca02af8e7599fe4836dc28007bbe7c1a0f5b52d377b44bc87e7e3f60bb869

Contents?: true

Size: 523 Bytes

Versions: 1

Compression:

Stored size: 523 Bytes

Contents

# frozen_string_literal: true

require 'pg_export/lib/pg_export/value_objects/result'

class PgExport
  module Operations
    class OpenConnection
      def initialize(gateway_factory:)
        @gateway_factory = gateway_factory
      end

      def name
        :open_connection
      end

      def call(inputs)
        gateway = gateway_factory.gateway
        gateway.open

        ValueObjects::Success.new(inputs.merge(gateway: gateway))
      end

      private

      attr_reader :gateway_factory
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pg_export-1.0.0.rc6 lib/pg_export/lib/pg_export/operations/open_connection.rb