Class: YouTube::Friend
- Inherits:
-
Object
- Object
- YouTube::Friend
- Defined in:
- lib/youtube.rb
Instance Attribute Summary collapse
-
#favorite_count ⇒ Object
readonly
Returns the value of attribute favorite_count.
-
#friend_count ⇒ Object
readonly
Returns the value of attribute friend_count.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
-
#video_upload_count ⇒ Object
readonly
Returns the value of attribute video_upload_count.
Instance Method Summary collapse
-
#initialize(payload) ⇒ Friend
constructor
A new instance of Friend.
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_count ⇒ Object (readonly)
Returns the value of attribute favorite_count.
216 217 218 |
# File 'lib/youtube.rb', line 216 def favorite_count @favorite_count end |
#friend_count ⇒ Object (readonly)
Returns the value of attribute friend_count.
217 218 219 |
# File 'lib/youtube.rb', line 217 def friend_count @friend_count end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
218 219 220 |
# File 'lib/youtube.rb', line 218 def user @user end |
#video_upload_count ⇒ Object (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 |