Class: Contacts::Contact::Linkedin

Inherits:
Struct
  • Object
show all
Defined in:
lib/contacts/contact/linkedin.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#first_nameObject

Returns the value of attribute first_name

Returns:

  • (Object)

    the current value of first_name



1
2
3
# File 'lib/contacts/contact/linkedin.rb', line 1

def first_name
  @first_name
end

#image_urlObject

Returns the value of attribute image_url

Returns:

  • (Object)

    the current value of image_url



1
2
3
# File 'lib/contacts/contact/linkedin.rb', line 1

def image_url
  @image_url
end

#last_nameObject

Returns the value of attribute last_name

Returns:

  • (Object)

    the current value of last_name



1
2
3
# File 'lib/contacts/contact/linkedin.rb', line 1

def last_name
  @last_name
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



1
2
3
# File 'lib/contacts/contact/linkedin.rb', line 1

def name
  @name
end

#uidObject

Returns the value of attribute uid

Returns:

  • (Object)

    the current value of uid



1
2
3
# File 'lib/contacts/contact/linkedin.rb', line 1

def uid
  @uid
end

Class Method Details

.parse(hash) ⇒ Object



3
4
5
# File 'lib/contacts/contact/linkedin.rb', line 3

def self.parse hash
  new hash['id'], "#{hash['firstName']} #{hash['lastName']}", hash['firstName'], hash['lastName'], hash['pictureUrl']
end