Class: YoutubeVideo::Author
- Inherits:
-
Object
- Object
- YoutubeVideo::Author
- Defined in:
- lib/YPBT/author.rb
Overview
comment’s author infomation
Instance Attribute Summary collapse
-
#author_channel_url ⇒ Object
readonly
Returns the value of attribute author_channel_url.
-
#author_image_url ⇒ Object
readonly
Returns the value of attribute author_image_url.
-
#author_name ⇒ Object
readonly
Returns the value of attribute author_name.
-
#like_count ⇒ Object
readonly
Returns the value of attribute like_count.
Instance Method Summary collapse
-
#initialize(data) ⇒ Author
constructor
A new instance of Author.
Constructor Details
#initialize(data) ⇒ Author
7 8 9 10 11 12 13 |
# File 'lib/YPBT/author.rb', line 7 def initialize(data) return unless data = data['authorDisplayName'] = data['authorProfileImageUrl'] = data['authorChannelUrl'] @like_count = data['likeCount'].to_i end |
Instance Attribute Details
#author_channel_url ⇒ Object (readonly)
Returns the value of attribute author_channel_url.
5 6 7 |
# File 'lib/YPBT/author.rb', line 5 def end |
#author_image_url ⇒ Object (readonly)
Returns the value of attribute author_image_url.
5 6 7 |
# File 'lib/YPBT/author.rb', line 5 def end |
#author_name ⇒ Object (readonly)
Returns the value of attribute author_name.
5 6 7 |
# File 'lib/YPBT/author.rb', line 5 def end |
#like_count ⇒ Object (readonly)
Returns the value of attribute like_count.
5 6 7 |
# File 'lib/YPBT/author.rb', line 5 def like_count @like_count end |