Class: Abbu::Contact

Inherits:
Object
  • Object
show all
Defined in:
lib/abbu/contact.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeContact

Returns a new instance of Contact.



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/abbu/contact.rb', line 15

def initialize
  @emails = []
  @phones = []
  @addresses = []
  @groups = []
  @urls = []
  @notes = []
  @related_names = []
  @social_profiles = []
  @dates = []
  @instant_messages = []
end

Instance Attribute Details

#addressesObject

Returns the value of attribute addresses.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def addresses
  @addresses
end

#anniversaryObject

Returns the value of attribute anniversary.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def anniversary
  @anniversary
end

#birthdayObject

Returns the value of attribute birthday.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def birthday
  @birthday
end

#companyObject

Returns the value of attribute company.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def company
  @company
end

#datesObject

Returns the value of attribute dates.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def dates
  @dates
end

#departmentObject

Returns the value of attribute department.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def department
  @department
end

#emailsObject

Returns the value of attribute emails.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def emails
  @emails
end

#first_nameObject

Returns the value of attribute first_name.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def first_name
  @first_name
end

#groupsObject

Returns the value of attribute groups.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def groups
  @groups
end

#instant_messagesObject

Returns the value of attribute instant_messages.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def instant_messages
  @instant_messages
end

#job_titleObject

Returns the value of attribute job_title.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def job_title
  @job_title
end

#last_nameObject

Returns the value of attribute last_name.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def last_name
  @last_name
end

#lunar_birthdayObject

Returns the value of attribute lunar_birthday.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def lunar_birthday
  @lunar_birthday
end

#maiden_nameObject

Returns the value of attribute maiden_name.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def maiden_name
  @maiden_name
end

#middle_nameObject

Returns the value of attribute middle_name.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def middle_name
  @middle_name
end

#nicknameObject

Returns the value of attribute nickname.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def nickname
  @nickname
end

#notesObject

Returns the value of attribute notes.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def notes
  @notes
end

#phonesObject

Returns the value of attribute phones.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def phones
  @phones
end

#phonetic_companyObject

Returns the value of attribute phonetic_company.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def phonetic_company
  @phonetic_company
end

#phonetic_first_nameObject

Returns the value of attribute phonetic_first_name.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def phonetic_first_name
  @phonetic_first_name
end

#phonetic_last_nameObject

Returns the value of attribute phonetic_last_name.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def phonetic_last_name
  @phonetic_last_name
end

#phonetic_middle_nameObject

Returns the value of attribute phonetic_middle_name.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def phonetic_middle_name
  @phonetic_middle_name
end

#prefixObject

Returns the value of attribute prefix.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def prefix
  @prefix
end

#pronounsObject

Returns the value of attribute pronouns.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def pronouns
  @pronouns
end

Returns the value of attribute related_names.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def related_names
  @related_names
end

#ringtoneObject

Returns the value of attribute ringtone.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def ringtone
  @ringtone
end

#social_profilesObject

Returns the value of attribute social_profiles.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def social_profiles
  @social_profiles
end

#suffixObject

Returns the value of attribute suffix.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def suffix
  @suffix
end

#texttoneObject

Returns the value of attribute texttone.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def texttone
  @texttone
end

#urlsObject

Returns the value of attribute urls.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def urls
  @urls
end

#verification_codeObject

Returns the value of attribute verification_code.



6
7
8
# File 'lib/abbu/contact.rb', line 6

def verification_code
  @verification_code
end

Instance Method Details

#full_nameObject



28
29
30
31
# File 'lib/abbu/contact.rb', line 28

def full_name
  quoted_nickname = nickname ? "\"#{nickname}\"" : nil
  [prefix, first_name, middle_name, quoted_nickname, last_name, suffix].compact.join(' ')
end

#inspectObject



38
39
40
# File 'lib/abbu/contact.rb', line 38

def inspect
  to_s
end

#to_sObject



33
34
35
36
# File 'lib/abbu/contact.rb', line 33

def to_s
  "#<Abbu::Contact first_name=#{first_name.inspect} last_name=#{last_name.inspect} " \
    "emails=#{emails.inspect} phones=#{phones.inspect}>"
end