lib/frodo/concerns/api.rb
def count(query)
        url_chunk = if query.is_a?(Frodo::Query)
                      query.include_count
                      query.to_s
                    else
                      service[query].query.count
                    end

        body = api_get(url_chunk).body

        if query.is_a?(Frodo::Query)
          body['@odata.count']
        else
          # Some servers (*cough* Microsoft *cough*) seem to return
          # extraneous characters in the response.
          # I found out that the _\xef\xbb\xbf  contains probably invisible junk characters
          # called the Unicode BOM (short name for: byte order mark).
          body.scan(/\d+/).first.to_i
        end
      end
# Public: Count the entity set or for the query passed
#
# entity_set or query  - A  String or a Frodo::Query. If String is passed,
#                         all entities for the set are counted.
Count the entity set or for the query passed
entity_set or query  - A  String or a Frodo::Query. If String is passed,
all entities for the set are counted.
Count the entity set or for the query passed entity_set or query - A String or a Frodo :: Query . If String is passed all entities for the set are counted .
def count(query)
        url_chunk = if query.is_a?(Frodo::Query)
                      query.include_count
                      query.to_s
                    else
                      service[query].query.count
                    end
        body = api_get(url_chunk).body
        if query.is_a?(Frodo::Query)
          body['@odata.count']
        else
          body.scan(/\d+/).first.to_i
        end
      end
def count ( query ) url_chunk = if query . is_a? ( Frodo :: Query ) query . include_count query . to_s else service [ query ] . query . count end body = api_get ( url_chunk ) . body if query . is_a? ( Frodo :: Query ) body [ '@odata.count' ] else body . scan ( / \d + / ) . first . to_i end end
Public: Count the entity set or for the query passed
entity_set or query  - A  String or a Frodo::Query.
Public : Count the entity set or for the query passed entity_set or query - A String or a Frodo :: Query .
# Some servers (*cough* Microsoft *cough*) seem to return # extraneous characters in the response. # I found out that the _\xef\xbb\xbf  contains probably invisible junk characters # called the Unicode BOM (short name for: byte order mark).
query