This method is deprecated or moved on the latest stable version.
The last existing version (v3.2.13) is shown here.
connection(refresh = false)
public
An instance of ActiveResource::Connection that
is the base connection to the
remote service. The refresh parameter toggles whether or not the
connection is
refreshed at every request or not (defaults to false).
# File activeresource/lib/active_resource/base.rb, line 547
def connection(refresh = false)
if defined?(@connection) || superclass == Object
@connection = Connection.new(site, format) if refresh || @connection.nil?
@connection.proxy = proxy if proxy
@connection.user = user if user
@connection.password = password if password
@connection.auth_type = auth_type if auth_type
@connection.timeout = timeout if timeout
@connection.ssl_options = ssl_options if ssl_options
@connection
else
superclass.connection
end
end