Class: YoutubeVideo::Comment
- Inherits:
-
Object
- Object
- YoutubeVideo::Comment
- Defined in:
- lib/YPBT/comment.rb
Overview
signle comment on video’s comment threads
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#comment_id ⇒ Object
readonly
Returns the value of attribute comment_id.
-
#like_count ⇒ Object
readonly
Returns the value of attribute like_count.
-
#published_at ⇒ Object
readonly
Returns the value of attribute published_at.
-
#text_display ⇒ Object
readonly
Returns the value of attribute text_display.
-
#time_tags ⇒ Object
readonly
Returns the value of attribute time_tags.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data: nil) ⇒ Comment
constructor
A new instance of Comment.
Constructor Details
#initialize(data: nil) ⇒ Comment
Returns a new instance of Comment.
12 13 14 |
# File 'lib/YPBT/comment.rb', line 12 def initialize(data: nil) load_data(data) end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
9 10 11 |
# File 'lib/YPBT/comment.rb', line 9 def @author end |
#comment_id ⇒ Object (readonly)
Returns the value of attribute comment_id.
9 10 11 |
# File 'lib/YPBT/comment.rb', line 9 def comment_id @comment_id end |
#like_count ⇒ Object (readonly)
Returns the value of attribute like_count.
9 10 11 |
# File 'lib/YPBT/comment.rb', line 9 def like_count @like_count end |
#published_at ⇒ Object (readonly)
Returns the value of attribute published_at.
9 10 11 |
# File 'lib/YPBT/comment.rb', line 9 def published_at @published_at end |
#text_display ⇒ Object (readonly)
Returns the value of attribute text_display.
9 10 11 |
# File 'lib/YPBT/comment.rb', line 9 def text_display @text_display end |
#time_tags ⇒ Object (readonly)
Returns the value of attribute time_tags.
9 10 11 |
# File 'lib/YPBT/comment.rb', line 9 def @time_tags end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
9 10 11 |
# File 'lib/YPBT/comment.rb', line 9 def updated_at @updated_at end |
Class Method Details
.find(comment_id:) ⇒ Object
16 17 18 19 |
# File 'lib/YPBT/comment.rb', line 16 def self.find(comment_id:) comment_data = YoutubeVideo::YtApi.comment_info(comment_id) new(data: comment_data) end |