Module: ApiBase::Connection

Included in:
Endpoint
Defined in:
lib/api_base/connection.rb

Instance Method Summary collapse

Instance Method Details

#connectionObject



5
6
7
8
# File 'lib/api_base/connection.rb', line 5

def connection
  @connection_cache ||= {}
  @connection_cache[connection_name] ||= with_connection(connection_name)
end

#connection_nameObject



10
11
12
# File 'lib/api_base/connection.rb', line 10

def connection_name
  defined?(@connection_name) ? @connection_name.to_sym : :default
end