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.
142 143 144 145 146 147 |
# File 'lib/youtube.rb', line 142 def initialize(payload) @favorite_count = payload['favorite_count'].to_i @friend_count = payload['friend_count'].to_i @user = payload['user'] @video_upload_count = payload['video_upload_count'].to_i end |
Instance Attribute Details
#favorite_count ⇒ Object (readonly)
Returns the value of attribute favorite_count.
137 138 139 |
# File 'lib/youtube.rb', line 137 def favorite_count @favorite_count end |
#friend_count ⇒ Object (readonly)
Returns the value of attribute friend_count.
138 139 140 |
# File 'lib/youtube.rb', line 138 def friend_count @friend_count end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
139 140 141 |
# File 'lib/youtube.rb', line 139 def user @user end |
#video_upload_count ⇒ Object (readonly)
Returns the value of attribute video_upload_count.
140 141 142 |
# File 'lib/youtube.rb', line 140 def video_upload_count @video_upload_count end |