class Yt::VideoAudit::SubscribeEndScreen
Count how many subject videos have an end screen with a subscribe link.
Public Instance Methods
description()
click to toggle source
# File lib/yt/video_audit/subscribe_end_screen.rb, line 12 def description 'The number of videos with any link to subscribe in its end screens' end
title()
click to toggle source
# File lib/yt/video_audit/subscribe_end_screen.rb, line 8 def title 'Subscribe End Screens' end
Private Instance Methods
valid?(video)
click to toggle source
# File lib/yt/video_audit/subscribe_end_screen.rb, line 18 def valid?(video) Yt::Annotations.for(video.id).any? do |annotation| annotation.instance_of?(Yt::Annotations::EndScreen) && annotation.link && annotation.link[:type] == :subscribe end end