Class: Ehbrs::Videos::Unsupported::CheckSet

Inherits:
Object
  • Object
show all
Defined in:
lib/ehbrs/videos/unsupported/check_set.rb

Defined Under Namespace

Classes: CheckWithProfiles

Class Method Summary collapse

Class Method Details

.build(profiles, type) ⇒ Object

type: “file” or “track”



14
15
16
17
18
19
20
21
22
23
# File 'lib/ehbrs/videos/unsupported/check_set.rb', line 14

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