Class: PgExport::Operations::OpenConnection

Inherits:
Object
  • Object
show all
Defined in:
lib/pg_export/operations/open_connection.rb

Instance Method Summary collapse

Constructor Details

#initialize(gateway_factory:) ⇒ OpenConnection

Returns a new instance of OpenConnection.



8
9
10
# File 'lib/pg_export/operations/open_connection.rb', line 8

def initialize(gateway_factory:)
  @gateway_factory = gateway_factory
end

Instance Method Details

#call(inputs) ⇒ Object



16
17
18
19
20
21
# File 'lib/pg_export/operations/open_connection.rb', line 16

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

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

#nameObject



12
13
14
# File 'lib/pg_export/operations/open_connection.rb', line 12

def name
  :open_connection
end