Class: MicrosoftLive::Contact
- Inherits:
-
Object
- Object
- MicrosoftLive::Contact
- Defined in:
- lib/microsoft-live/contact.rb
Instance Attribute Summary collapse
-
#birth_day ⇒ Object
Returns the value of attribute birth_day.
-
#birth_month ⇒ Object
Returns the value of attribute birth_month.
-
#email_hashes ⇒ Object
Returns the value of attribute email_hashes.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_favorite ⇒ Object
Returns the value of attribute is_favorite.
-
#is_friend ⇒ Object
Returns the value of attribute is_friend.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#name ⇒ Object
Returns the value of attribute name.
-
#simple ⇒ Object
Returns the value of attribute simple.
-
#updated_time ⇒ Object
Returns the value of attribute updated_time.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(data: {}, simple:) ⇒ Contact
constructor
A new instance of Contact.
- #user ⇒ Object
Constructor Details
#initialize(data: {}, simple:) ⇒ Contact
Returns a new instance of Contact.
17 18 19 20 21 22 |
# File 'lib/microsoft-live/contact.rb', line 17 def initialize(data: {}, simple:) data.each do |key,val| self.send "#{key}=", val end self.simple = simple end |
Instance Attribute Details
#birth_day ⇒ Object
Returns the value of attribute birth_day.
4 5 6 |
# File 'lib/microsoft-live/contact.rb', line 4 def birth_day @birth_day end |
#birth_month ⇒ Object
Returns the value of attribute birth_month.
4 5 6 |
# File 'lib/microsoft-live/contact.rb', line 4 def birth_month @birth_month end |
#email_hashes ⇒ Object
Returns the value of attribute email_hashes.
4 5 6 |
# File 'lib/microsoft-live/contact.rb', line 4 def email_hashes @email_hashes end |
#first_name ⇒ Object
Returns the value of attribute first_name.
4 5 6 |
# File 'lib/microsoft-live/contact.rb', line 4 def first_name @first_name end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/microsoft-live/contact.rb', line 4 def id @id end |
#is_favorite ⇒ Object
Returns the value of attribute is_favorite.
4 5 6 |
# File 'lib/microsoft-live/contact.rb', line 4 def is_favorite @is_favorite end |
#is_friend ⇒ Object
Returns the value of attribute is_friend.
4 5 6 |
# File 'lib/microsoft-live/contact.rb', line 4 def is_friend @is_friend end |
#last_name ⇒ Object
Returns the value of attribute last_name.
4 5 6 |
# File 'lib/microsoft-live/contact.rb', line 4 def last_name @last_name end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/microsoft-live/contact.rb', line 4 def name @name end |
#simple ⇒ Object
Returns the value of attribute simple.
4 5 6 |
# File 'lib/microsoft-live/contact.rb', line 4 def simple @simple end |
#updated_time ⇒ Object
Returns the value of attribute updated_time.
4 5 6 |
# File 'lib/microsoft-live/contact.rb', line 4 def updated_time @updated_time end |
#user_id ⇒ Object
Returns the value of attribute user_id.
4 5 6 |
# File 'lib/microsoft-live/contact.rb', line 4 def user_id @user_id end |
Instance Method Details
#user ⇒ Object
24 25 26 27 |
# File 'lib/microsoft-live/contact.rb', line 24 def user return unless user_id simple.user(user_id) end |