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.



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_countObject (readonly)

Returns the value of attribute favorite_count.



137
138
139
# File 'lib/youtube.rb', line 137

def favorite_count
  @favorite_count
end

#friend_countObject (readonly)

Returns the value of attribute friend_count.



138
139
140
# File 'lib/youtube.rb', line 138

def friend_count
  @friend_count
end

#userObject (readonly)

Returns the value of attribute user.



139
140
141
# File 'lib/youtube.rb', line 139

def user
  @user
end

#video_upload_countObject (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