Class: Consul::Response
- Inherits:
-
Object
- Object
- Consul::Response
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/consul/response.rb
Defined Under Namespace
Classes: KeyError
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(net_http_response, request_path = '/') ⇒ Response
constructor
A new instance of Response.
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
#data ⇒ Object (readonly)
Returns the value of attribute data.
10 11 12 |
# File 'lib/consul/response.rb', line 10 def data @data end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
10 11 12 |
# File 'lib/consul/response.rb', line 10 def response @response end |