Class: Consul::Client::FakeNetHttpResponse
- Inherits:
-
Object
- Object
- Consul::Client::FakeNetHttpResponse
- Defined in:
- lib/consul/client/fake_http_response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Instance Method Summary collapse
- #code ⇒ Object
- #code_type ⇒ Object
-
#initialize(body = "Good news everyone!") ⇒ FakeNetHttpResponse
constructor
A new instance of FakeNetHttpResponse.
Constructor Details
#initialize(body = "Good news everyone!") ⇒ FakeNetHttpResponse
Returns a new instance of FakeNetHttpResponse.
7 8 9 |
# File 'lib/consul/client/fake_http_response.rb', line 7 def initialize(body="Good news everyone!") @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/consul/client/fake_http_response.rb', line 6 def body @body end |
Instance Method Details
#code ⇒ Object
11 12 13 |
# File 'lib/consul/client/fake_http_response.rb', line 11 def code "200" end |
#code_type ⇒ Object
15 16 17 |
# File 'lib/consul/client/fake_http_response.rb', line 15 def code_type Net::HTTPOK end |