Class: RubyDuga::Response
- Inherits:
-
Object
- Object
- RubyDuga::Response
- Defined in:
- lib/ruby_duga/response.rb
Instance Attribute Summary collapse
-
#original_response ⇒ Object
readonly
Returns the value of attribute original_response.
Instance Method Summary collapse
- #body ⇒ Object
- #headers ⇒ Object
-
#initialize(faraday_response) ⇒ Response
constructor
A new instance of Response.
- #status ⇒ Object
Constructor Details
#initialize(faraday_response) ⇒ Response
Returns a new instance of Response.
5 6 7 |
# File 'lib/ruby_duga/response.rb', line 5 def initialize(faraday_response) @original_response = faraday_response end |
Instance Attribute Details
#original_response ⇒ Object (readonly)
Returns the value of attribute original_response.
9 10 11 |
# File 'lib/ruby_duga/response.rb', line 9 def original_response @original_response end |
Instance Method Details
#body ⇒ Object
11 12 13 |
# File 'lib/ruby_duga/response.rb', line 11 def body @body ||= original_response.body.deep_symbolize_keys end |
#headers ⇒ Object
15 16 17 |
# File 'lib/ruby_duga/response.rb', line 15 def headers original_response.headers end |
#status ⇒ Object
19 20 21 |
# File 'lib/ruby_duga/response.rb', line 19 def status original_response.status end |