lib/parse/client/response.rb
def parse_result!(h)
      @result = {}
      return unless h.is_a?(Hash)
      @code = h[CODE]
      @error = h[ERROR]
      if h[RESULTS].is_a?(Array)
        @result = h[RESULTS]
        @count = h[COUNT] || @result.count
      else
        @result = h
        @count = 1
      end

    end
def parse_result!(h)
      @result = {}
      return unless h.is_a?(Hash)
      @code = h[CODE]
      @error = h[ERROR]
      if h[RESULTS].is_a?(Array)
        @result = h[RESULTS]
        @count = h[COUNT] || @result.count
      else
        @result = h
        @count = 1
      end

    end
def parse_result! ( h ) @result = { } return unless h . is_a? ( Hash ) @code = h [ CODE ] @error = h [ ERROR ] if h [ RESULTS ] . is_a? ( Array ) @result = h [ RESULTS ] @count = h [ COUNT ] || @result . count else @result = h @count = 1 end end
This method takes the result hash and determines if it is a regular
 parse query result, object result or a count result. The response should
 be a hash either containing the result data or the error.
This method takes the result hash and determines if it is a regular parse query result object result or a count result . The response should be a hash either containing the result data or the error .