Sha256: e02a66dc2deed0ebf9eb9ca2ccce489ba42051eb00f6a3574eb35c854eec3054
Contents?: true
Size: 973 Bytes
Versions: 50
Compression:
Stored size: 973 Bytes
Contents
# frozen_string_literal: true require 'ehbrs/videos/unsupported/checks' module Ehbrs module Videos module Unsupported class CheckSet enable_simple_cache common_constructor :checks class << self # type: "file" or "track" def build(profiles, type) r = {} profiles.each do |profile| profile.send("#{type}_checks").each do |check| r[check] ||= CheckWithProfiles.new(check) r[check].add_profile(profile) end end new(r.values) end end class CheckWithProfiles < ::SimpleDelegator def initialize(check) super(check) @profiles = [] end def check_name __getobj__.class.name.demodulize end def add_profile(profile) @profiles << profile end end end end end end
Version data entries
50 entries across 50 versions & 1 rubygems