Class: RandomYoutubeComment::Comment
- Inherits:
-
Object
- Object
- RandomYoutubeComment::Comment
- Defined in:
- lib/random_youtube_comment/comment.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#body ⇒ Object
Returns the value of attribute body.
-
#id ⇒ Object
Returns the value of attribute id.
-
#title ⇒ Object
Returns the value of attribute title.
-
#video ⇒ Object
Returns the value of attribute video.
-
#video_id ⇒ Object
Returns the value of attribute video_id.
-
#youtube_it_comment ⇒ Object
Returns the value of attribute youtube_it_comment.
Instance Method Summary collapse
-
#initialize ⇒ Comment
constructor
A new instance of Comment.
Constructor Details
#initialize ⇒ Comment
Returns a new instance of Comment.
7 8 9 10 11 12 13 14 |
# File 'lib/random_youtube_comment/comment.rb', line 7 def initialize @video = RandomYoutubeComment::YoutubeClient.random_video @video_id = @video.unique_id @youtube_it_comment = RandomYoutubeComment::YoutubeClient.random_comment_for_video(@video_id) @id, @author = @youtube_it_comment.url.split(":").last, @youtube_it_comment..name @body, @title = @youtube_it_comment.content, @youtube_it_comment.title end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
5 6 7 |
# File 'lib/random_youtube_comment/comment.rb', line 5 def @author end |
#body ⇒ Object
Returns the value of attribute body.
5 6 7 |
# File 'lib/random_youtube_comment/comment.rb', line 5 def body @body end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/random_youtube_comment/comment.rb', line 5 def id @id end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'lib/random_youtube_comment/comment.rb', line 5 def title @title end |
#video ⇒ Object
Returns the value of attribute video.
5 6 7 |
# File 'lib/random_youtube_comment/comment.rb', line 5 def video @video end |
#video_id ⇒ Object
Returns the value of attribute video_id.
5 6 7 |
# File 'lib/random_youtube_comment/comment.rb', line 5 def video_id @video_id end |
#youtube_it_comment ⇒ Object
Returns the value of attribute youtube_it_comment.
5 6 7 |
# File 'lib/random_youtube_comment/comment.rb', line 5 def youtube_it_comment @youtube_it_comment end |