Class: Contacts::Contact::Facebook

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



1
2
3
# File 'lib/contacts/contact/facebook.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/facebook.rb', line 1

def uid
  @uid
end

Class Method Details

.parse(hash) ⇒ Object



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

def self.parse hash
  new hash['id'], hash['name']
end

Instance Method Details

#image_urlObject



7
8
9
# File 'lib/contacts/contact/facebook.rb', line 7

def image_url
  "http://graph.facebook.com/#{uid}/picture"
end