Class: D13n::Metric::HTTPClients::NetHTTPClientResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/d13n/metric/http_clients/net_http_wrappers.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection, response) ⇒ NetHTTPClientResponse

Returns a new instance of NetHTTPClientResponse.



41
42
43
# File 'lib/d13n/metric/http_clients/net_http_wrappers.rb', line 41

def initialize(connection, response)
  @response = response
end

Instance Method Details

#status_codeObject



50
51
52
# File 'lib/d13n/metric/http_clients/net_http_wrappers.rb', line 50

def status_code
  @response.code
end

#uriObject



45
46
47
48
# File 'lib/d13n/metric/http_clients/net_http_wrappers.rb', line 45

def uri
  return @response.uri unless @response.uri.nil?
  nil
end