static public Method

Base.connection(refresh = false)

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).

Source Code

# File active_resource/base.rb, line 206
def connection(refresh = false)
  if defined?(@connection) || superclass == Object
    @connection = Connection.new(site, format) if refresh || @connection.nil?
    @connection
  else
    superclass.connection
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.