Sha256: fb0df9fb6725be8d0f762917b4b78d9e74adc03e212c5d91822a2058df56c18f
Contents?: true
Size: 605 Bytes
Versions: 4
Compression:
Stored size: 605 Bytes
Contents
require 'yt/video_audit/base' module Yt module VideoAudit # Count how many videos have video description includes # a link to its own channel. class YoutubeAssociation < Base def title 'YouTube Association' end def description 'The number of videos with description has a link to its own channel' end private def valid?(video) video.description.split(' ') .select {|word| Yt::URL.new(word).kind == :channel } .any? {|link| Yt::Channel.new(url: link).id == video.channel_id } end end end end
Version data entries
4 entries across 4 versions & 1 rubygems