Class: GmailContacts::Contact

Inherits:
Struct
  • Object
show all
Defined in:
lib/gmail_contacts.rb,
lib/gmail_contacts.rb

Overview

Struct containing title, emails, ims, phone_numbers and addresses

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addressesObject

Returns the value of attribute addresses

Returns:

  • (Object)

    the current value of addresses



39
40
41
# File 'lib/gmail_contacts.rb', line 39

def addresses
  @addresses
end

#emailsObject

Returns the value of attribute emails

Returns:

  • (Object)

    the current value of emails



39
40
41
# File 'lib/gmail_contacts.rb', line 39

def emails
  @emails
end

#imsObject

Returns the value of attribute ims

Returns:

  • (Object)

    the current value of ims



39
40
41
# File 'lib/gmail_contacts.rb', line 39

def ims
  @ims
end

#phone_numbersObject

Returns the value of attribute phone_numbers

Returns:

  • (Object)

    the current value of phone_numbers



39
40
41
# File 'lib/gmail_contacts.rb', line 39

def phone_numbers
  @phone_numbers
end

#photo_urlObject

Returns the value of attribute photo_url

Returns:

  • (Object)

    the current value of photo_url



39
40
41
# File 'lib/gmail_contacts.rb', line 39

def photo_url
  @photo_url
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



39
40
41
# File 'lib/gmail_contacts.rb', line 39

def title
  @title
end

Instance Method Details

#primary_emailObject

Returns the user’s primary email address



50
51
52
# File 'lib/gmail_contacts.rb', line 50

def primary_email
  emails.first
end