Sha256: 271f3b3259a0a7371b6c6a8c02f12dc38fa6ecf1c27a8308048af03d95e1cf2e

Contents?: true

Size: 331 Bytes

Versions: 3

Compression:

Stored size: 331 Bytes

Contents

module GoogleClient

  module Format

    def decode_response(response)
      response = if json?
        JSON.parse(response.body)
      else
        raise Error.new "Unknow data format"
      end
    end

    def json?
      defined? @json_mode and return @json_mode
      raise Error.new "Unknown data format"
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
google_client-0.2.1 lib/google_client/format.rb
google_client-0.2.0 lib/google_client/format.rb
google_client-0.1.0 lib/google_client/format.rb