Class: UserProfilePhotos
- Inherits:
-
Object
- Object
- UserProfilePhotos
- Defined in:
- lib/objects/user_profile_photos.rb
Overview
Monday
, August
24
2020
This object represent a user’s profile pictures.
Instance Method Summary collapse
-
#initialize(photo) ⇒ UserProfilePhotos
constructor
:nodoc:.
-
#photos ⇒ Object
Requested profile pictures (in up to 4 sizes each).
-
#total_count ⇒ Object
Total number of profile pictures the target user has.
Constructor Details
#initialize(photo) ⇒ UserProfilePhotos
:nodoc:
10 11 12 |
# File 'lib/objects/user_profile_photos.rb', line 10 def initialize(photo) # :nodoc: @photo = photo end |
Instance Method Details
#photos ⇒ Object
Requested profile pictures (in up to 4 sizes each). Returns array of array of PhotoSize.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/objects/user_profile_photos.rb', line 23 def photos data = @photo.photos photo_size = [] data.each do |e| ary = [] e.each do |e_d| ary << PhotoSize.new(e_d) end photo_size << ary end photo_size end |
#total_count ⇒ Object
Total number of profile pictures the target user has.
16 17 18 |
# File 'lib/objects/user_profile_photos.rb', line 16 def total_count @photo.total_count end |