class Yt::VideoAudit::VideoEndScreen

Count how many subject videos have an end screen with a video link.

Public Instance Methods

description() click to toggle source
# File lib/yt/video_audit/video_end_screen.rb, line 12
def description
  'The number of videos with any link to a video in its end screens'
end
title() click to toggle source
# File lib/yt/video_audit/video_end_screen.rb, line 8
def title
  'Video End Screens'
end

Private Instance Methods

valid?(video) click to toggle source
# File lib/yt/video_audit/video_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] == :video
  end
end