Class: FedgerAPI::Response
- Inherits:
-
Object
- Object
- FedgerAPI::Response
- Defined in:
- lib/fedger_api/response.rb
Overview
Class implements response
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
- #to_a ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
6 7 8 9 |
# File 'lib/fedger_api/response.rb', line 6 def initialize(response) @response = response create_keys! end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
4 5 6 |
# File 'lib/fedger_api/response.rb', line 4 def response @response end |
Instance Method Details
#to_a ⇒ Object
15 16 17 |
# File 'lib/fedger_api/response.rb', line 15 def to_a response.map { |k, v| [k, v] } end |
#to_h ⇒ Object
11 12 13 |
# File 'lib/fedger_api/response.rb', line 11 def to_h response.to_h end |