Sha256: 1ae481e3937dc8e13740fa73479b0678e5f71bdaaa24462399fbb1543091fab4

Contents?: true

Size: 600 Bytes

Versions: 1

Compression:

Stored size: 600 Bytes

Contents

require 'yt/video_audit/base'

module Yt
  module VideoAudit
    # Count how many subject videos have an end screens
    # with a video link.
    class VideoEndScreen < Base
      def title
        'Video End Screens'
      end

      def description
        'The number of videos with any link to a video in its end screens'
      end

    private

      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
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yt-audit-0.5.2 lib/yt/video_audit/video_end_screen.rb