class RandomYoutubeComment::Comment
Attributes
body[RW]
id[RW]
title[RW]
video[RW]
video_id[RW]
youtube_it_comment[RW]
Public Class Methods
new()
click to toggle source
# 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.author.name @body, @title = @youtube_it_comment.content, @youtube_it_comment.title end