Class: Evri::RPX::Contact
- Inherits:
-
Object
- Object
- Evri::RPX::Contact
- Defined in:
- lib/evri/rpx/contact.rb
Instance Attribute Summary collapse
-
#display_name ⇒ Object
readonly
Returns the person’s display name, eg “Bob Johnson”.
-
#emails ⇒ Object
readonly
Returns an array of emails, eg [‘[email protected]’].
Instance Method Summary collapse
-
#initialize(json) ⇒ Contact
constructor
A new instance of Contact.
Constructor Details
#initialize(json) ⇒ Contact
Returns a new instance of Contact.
10 11 12 13 14 15 |
# File 'lib/evri/rpx/contact.rb', line 10 def initialize(json) @display_name = json['displayName'] @emails = json['emails'].map do |email| email['value'] end end |
Instance Attribute Details
#display_name ⇒ Object (readonly)
Returns the person’s display name, eg “Bob Johnson”.
5 6 7 |
# File 'lib/evri/rpx/contact.rb', line 5 def display_name @display_name end |
#emails ⇒ Object (readonly)
Returns an array of emails, eg [‘[email protected]’]
8 9 10 |
# File 'lib/evri/rpx/contact.rb', line 8 def emails @emails end |