Class: Rapuncel::Adapters::NetHttpAdapter::HttpResponse
- Defined in:
- lib/rapuncel/adapters/net_http_adapter.rb
Instance Method Summary collapse
- #body ⇒ Object
- #code ⇒ Object
-
#initialize(response) ⇒ HttpResponse
constructor
A new instance of HttpResponse.
- #success? ⇒ Boolean
Constructor Details
#initialize(response) ⇒ HttpResponse
Returns a new instance of HttpResponse.
10 11 12 |
# File 'lib/rapuncel/adapters/net_http_adapter.rb', line 10 def initialize response @response = response end |
Instance Method Details
#body ⇒ Object
18 19 20 |
# File 'lib/rapuncel/adapters/net_http_adapter.rb', line 18 def body @response.body end |
#code ⇒ Object
22 23 24 |
# File 'lib/rapuncel/adapters/net_http_adapter.rb', line 22 def code @response.code end |
#success? ⇒ Boolean
14 15 16 |
# File 'lib/rapuncel/adapters/net_http_adapter.rb', line 14 def success? @response.is_a? Net::HTTPOK end |