Module: GoogleClient::Format
Instance Method Summary collapse
Instance Method Details
#decode_response(response) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/google_client/format.rb', line 5 def decode_response(response) response = if json? JSON.parse(response.body) else raise Error.new "Unknow data format" end end |
#json? ⇒ Boolean
13 14 15 16 |
# File 'lib/google_client/format.rb', line 13 def json? defined? @json_mode and return @json_mode raise Error.new "Unknown data format" end |