class Seahorse::Client::NetHttp::ConnectionPool::ExtendedSession
Helper methods extended onto Net::HTTPSession objects opend by the connection pool. @api private
Attributes
last_used[R]
@return [Time,nil]
Public Class Methods
new(http)
click to toggle source
Calls superclass method
# File lib/seahorse/client/net_http/connection_pool.rb, line 318 def initialize(http) super(http) @http = http end
Public Instance Methods
__getobj__()
click to toggle source
# File lib/seahorse/client/net_http/connection_pool.rb, line 326 def __getobj__ @http end
__setobj__(obj)
click to toggle source
# File lib/seahorse/client/net_http/connection_pool.rb, line 330 def __setobj__(obj) @http = obj end
finish()
click to toggle source
Attempts to close/finish the session without raising an error.
# File lib/seahorse/client/net_http/connection_pool.rb, line 341 def finish @http.finish rescue IOError nil end
request(*args, &block)
click to toggle source
Sends the request and tracks that this session has been used.
# File lib/seahorse/client/net_http/connection_pool.rb, line 335 def request(*args, &block) @last_used = Time.now @http.request(*args, &block) end