Class: Ppl::Entity::Contact
- Inherits:
-
Object
- Object
- Ppl::Entity::Contact
- Defined in:
- lib/ppl/entity/contact.rb
Instance Attribute Summary collapse
-
#birthday ⇒ Object
Returns the value of attribute birthday.
-
#email_addresses ⇒ Object
Returns the value of attribute email_addresses.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#organization ⇒ Object
Returns the value of attribute organization.
-
#phone_number ⇒ Object
Returns the value of attribute phone_number.
-
#postal_address ⇒ Object
Returns the value of attribute postal_address.
Instance Method Summary collapse
- #has_email_address?(email_address) ⇒ Boolean
-
#initialize ⇒ Contact
constructor
A new instance of Contact.
- #set_postal_address {|@postal_address| ... } ⇒ Object
Constructor Details
#initialize ⇒ Contact
Returns a new instance of Contact.
12 13 14 |
# File 'lib/ppl/entity/contact.rb', line 12 def initialize @email_addresses = [] end |
Instance Attribute Details
#birthday ⇒ Object
Returns the value of attribute birthday.
7 8 9 |
# File 'lib/ppl/entity/contact.rb', line 7 def birthday @birthday end |
#email_addresses ⇒ Object
Returns the value of attribute email_addresses.
6 7 8 |
# File 'lib/ppl/entity/contact.rb', line 6 def email_addresses @email_addresses end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/ppl/entity/contact.rb', line 4 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/ppl/entity/contact.rb', line 5 def name @name end |
#organization ⇒ Object
Returns the value of attribute organization.
9 10 11 |
# File 'lib/ppl/entity/contact.rb', line 9 def organization @organization end |
#phone_number ⇒ Object
Returns the value of attribute phone_number.
8 9 10 |
# File 'lib/ppl/entity/contact.rb', line 8 def phone_number @phone_number end |
#postal_address ⇒ Object
Returns the value of attribute postal_address.
10 11 12 |
# File 'lib/ppl/entity/contact.rb', line 10 def postal_address @postal_address end |
Instance Method Details
#has_email_address?(email_address) ⇒ Boolean
23 24 25 |
# File 'lib/ppl/entity/contact.rb', line 23 def has_email_address?(email_address) @email_addresses.include? email_address end |
#set_postal_address {|@postal_address| ... } ⇒ Object
16 17 18 19 20 21 |
# File 'lib/ppl/entity/contact.rb', line 16 def set_postal_address if @postal_address.nil? @postal_address = Ppl::Entity::PostalAddress.new end yield @postal_address end |