Class: Evri::RPX::Contact

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (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

#emailsObject (readonly)

Returns an array of emails, eg [‘[email protected]’]



8
9
10
# File 'lib/evri/rpx/contact.rb', line 8

def emails
  @emails
end