Class: Tidepool::JSONParser
- Inherits:
-
HTTParty::Parser
- Object
- HTTParty::Parser
- Tidepool::JSONParser
- Defined in:
- lib/tidepool/json_parser.rb
Instance Method Summary collapse
-
#initialize(body, format) ⇒ JSONParser
constructor
override parser initalizer to check for bad empty array before parsing this is a known bug in the Tidepool API.
Constructor Details
#initialize(body, format) ⇒ JSONParser
override parser initalizer to check for bad empty array before parsing this is a known bug in the Tidepool API
5 6 7 8 |
# File 'lib/tidepool/json_parser.rb', line 5 def initialize(body, format) @body = (body == "]") ? "[]" : body @format = format end |