Class: Consul::Response

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Enumerable
Defined in:
lib/consul/response.rb

Defined Under Namespace

Classes: KeyError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(net_http_response, request_path = '/') ⇒ Response

Returns a new instance of Response.



16
17
18
19
# File 'lib/consul/response.rb', line 16

def initialize(net_http_response, request_path='/')
  @response = net_http_response
  @request_path = File.dirname(request_path)
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



10
11
12
# File 'lib/consul/response.rb', line 10

def data
  @data
end

#responseObject (readonly)

Returns the value of attribute response.



10
11
12
# File 'lib/consul/response.rb', line 10

def response
  @response
end