module Gateway::Connection

Public Instance Methods

purge_current_connection!() click to toggle source
# File lib/gateway/connection.rb, line 7
def purge_current_connection!
  send "purge_current_connection_from_#{connection_type}!"
end

Protected Instance Methods

connect() click to toggle source
# File lib/gateway/connection.rb, line 13
def connect
  raise "Abstract Method"
end
connection_type() click to toggle source
# File lib/gateway/connection.rb, line 25
def connection_type
  @connection_type ||= (options[:connection_type] || :thread_local)
end
disconnect(conn) click to toggle source
# File lib/gateway/connection.rb, line 17
def disconnect(conn)
  raise "Abstract Method"
end
reconnect(conn) click to toggle source
# File lib/gateway/connection.rb, line 21
def reconnect(conn)
  raise "Abstract Method"
end
with_connection(opts={}, &block) click to toggle source
# File lib/gateway/connection.rb, line 29
def with_connection(opts={}, &block)
  return with_single(&block) if opts[:persistent] == false
  send "with_#{connection_type}", &block
end