Method: HttpSession.use

Defined in:
lib/http_session.rb

.use(host, use_ssl = false, port = nil) ⇒ Object

get the session for the given host and port, creating a new one if it doesn’t exist



156
157
158
159
# File 'lib/http_session.rb', line 156

def self.use(host, use_ssl=false, port=nil)
  key = key(host, use_ssl, port)
  @@sessions.has_key?(key) ? @@sessions[key] : (@@sessions[key] = new(host, use_ssl, port_or_default(port, use_ssl)))
end