Sha256: e30cfd53abf318a98538e492e63977e361fcc0175b52528d07e6fc68421ebc6b

Contents?: true

Size: 410 Bytes

Versions: 6

Compression:

Stored size: 410 Bytes

Contents

module GoogleContactsApi
  class ContactSet < GoogleContactsApi::ResultSet
    # Populate from a response that contains contacts
    def initialize(response_body, api = nil)
      super
      if @parsed.nil? || @parsed.feed.nil? || @parsed.feed.entry.nil?
        @results = []
      else
        @results = @parsed.feed.entry.map { |e| GoogleContactsApi::Contact.new(e, nil, api) }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
google_contacts_api-0.4.1 lib/google_contacts_api/contact_set.rb
google_contacts_api-0.4.0 lib/google_contacts_api/contact_set.rb
google_contacts_api-0.3.3 lib/google_contacts_api/contact_set.rb
google_contacts_api-0.3.2 lib/google_contacts_api/contact_set.rb
google_contacts_api-0.3.1 lib/google_contacts_api/contact_set.rb
google_contacts_api-0.3.0 lib/google_contacts_api/contact_set.rb