Class: Bambora::QueryStringResponse
- Defined in:
- lib/bambora/adapters/query_string_response.rb
Overview
Parses a query string response into a Hash
Constant Summary
Constants inherited from Response
Instance Attribute Summary
Attributes inherited from Response
Instance Method Summary collapse
Methods inherited from Response
Constructor Details
This class inherits a constructor from Bambora::Response
Instance Method Details
#to_h ⇒ Object
7 8 9 10 11 12 |
# File 'lib/bambora/adapters/query_string_response.rb', line 7 def to_h parsed_response = super return error_response if parsed_response.values.flatten.empty? # We didn't get a query string back. parsed_response.transform_values { |val| val.length == 1 ? val.first : val } end |