Class: YouTube::Friend

Inherits:
Object
  • Object
show all
Defined in:
lib/youtube.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ Friend

Returns a new instance of Friend.



221
222
223
224
225
226
# File 'lib/youtube.rb', line 221

def initialize(payload)
  @favorite_count = payload['favorite_count'].to_i
  @friend_count = payload['friend_count'].to_i
  @user = payload['user'].to_s
  @video_upload_count = payload['video_upload_count'].to_i
end

Instance Attribute Details

#favorite_countObject (readonly)

Returns the value of attribute favorite_count.



216
217
218
# File 'lib/youtube.rb', line 216

def favorite_count
  @favorite_count
end

#friend_countObject (readonly)

Returns the value of attribute friend_count.



217
218
219
# File 'lib/youtube.rb', line 217

def friend_count
  @friend_count
end

#userObject (readonly)

Returns the value of attribute user.



218
219
220
# File 'lib/youtube.rb', line 218

def user
  @user
end

#video_upload_countObject (readonly)

Returns the value of attribute video_upload_count.



219
220
221
# File 'lib/youtube.rb', line 219

def video_upload_count
  @video_upload_count
end