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.



10
11
12
13
14
15
16
17
18
19
# File 'lib/abbu/contact.rb', line 10

def initialize
  @emails = []
  @phones = []
  @addresses = []
  @groups = []
  @urls = []
  @notes = []
  @related_names = []
  @social_profiles = []
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

#companyObject

Returns the value of attribute company.



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

def company
  @company
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

#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

#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

#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

#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

Instance Method Details

#full_nameObject



21
22
23
24
# File 'lib/abbu/contact.rb', line 21

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

#inspectObject



31
32
33
# File 'lib/abbu/contact.rb', line 31

def inspect
  to_s
end

#to_sObject



26
27
28
29
# File 'lib/abbu/contact.rb', line 26

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