Class: Mogli::Profile
Instance Attribute Summary
Attributes inherited from Model
Attributes included from Model::Search
Instance Method Summary collapse
-
#image_url ⇒ Object
Facebook’s defaults image url, which seems to be the same as square_image_url at this time.
-
#large_image_url ⇒ Object
About 200 pixels wide, variable height image url.
-
#normal_image_url ⇒ Object
64.64 pixel image url.
- #sized_image_url(size) ⇒ Object
-
#small_image_url ⇒ Object
50 pixels wide, variable height image url.
-
#square_image_url ⇒ Object
50x50 pixel image url.
- #to_s ⇒ Object
Methods inherited from Model
#==, add_creation_method, #client, #client=, creation_keys, creation_properties, define_properties, #destroy, #fetch, find, fql_mapping, has_association, hash_populating_accessor, included, #initialize, #merge!, #method_missing, #post_params, property, recognize?, #warn_about_invalid_property
Methods included from Model::Search
Constructor Details
This class inherits a constructor from Mogli::Model
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Mogli::Model
Instance Method Details
#image_url ⇒ Object
Facebook’s defaults image url, which seems to be the same as square_image_url at this time
21 22 23 |
# File 'lib/mogli/profile.rb', line 21 def image_url "https://graph.facebook.com/#{id}/picture" end |
#large_image_url ⇒ Object
About 200 pixels wide, variable height image url
41 42 43 |
# File 'lib/mogli/profile.rb', line 41 def large_image_url sized_image_url("large") end |
#normal_image_url ⇒ Object
64.64 pixel image url
36 37 38 |
# File 'lib/mogli/profile.rb', line 36 def normal_image_url sized_image_url("normal") end |
#sized_image_url(size) ⇒ Object
45 46 47 |
# File 'lib/mogli/profile.rb', line 45 def sized_image_url(size) "#{image_url}?type=#{size}" end |
#small_image_url ⇒ Object
50 pixels wide, variable height image url
31 32 33 |
# File 'lib/mogli/profile.rb', line 31 def small_image_url sized_image_url("small") end |
#square_image_url ⇒ Object
50x50 pixel image url
26 27 28 |
# File 'lib/mogli/profile.rb', line 26 def square_image_url sized_image_url("square") end |
#to_s ⇒ Object
49 50 51 |
# File 'lib/mogli/profile.rb', line 49 def to_s name end |