Sha256: eec3ed7595d2821c94b370f13fb9c87557ded495c30b51b322b1acdeee8d6957

Contents?: true

Size: 1.25 KB

Versions: 6

Compression:

Stored size: 1.25 KB

Contents

# frozen_string_literal: true

require 'ehbrs_ruby_utils/videos/file'
require 'ehbrs_ruby_utils/videos2/unsupported/file/fix'
require 'ehbrs_ruby_utils/videos2/unsupported/check_support'
require 'ehbrs_ruby_utils/videos2/unsupported/track'

module EhbrsRubyUtils
  module Videos2
    module Unsupported
      class File < ::EhbrsRubyUtils::Videos::File
        include ::EhbrsRubyUtils::Videos2::Unsupported::CheckSupport
        include ::EhbrsRubyUtils::Videos2::Unsupported::File::Fix

        attr_reader :options

        def initialize(file, options)
          super(file)
          @options = options
        end

        def banner
          infov 'File', path
          pad_speaker do
            aggressions_banner('Self')
            tracks.each(&:banner)
          end
        end

        def all_passed?
          passed? && tracks.all?(&:passed?)
        end

        def all_fixes
          fixes + tracks.flat_map(&:fixes)
        end

        def check_set_key
          :file_check_set
        end

        private

        # @return [Enumerable<EhbrsRubyUtils::Videos2::Unsupported::Track>]
        def tracks_uncached
          streams.reject.map { |t| ::EhbrsRubyUtils::Videos2::Unsupported::Track.new(self, t) }
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ehbrs_ruby_utils-0.44.3 lib/ehbrs_ruby_utils/videos2/unsupported/file.rb
ehbrs_ruby_utils-0.44.2 lib/ehbrs_ruby_utils/videos2/unsupported/file.rb
ehbrs_ruby_utils-0.44.1 lib/ehbrs_ruby_utils/videos2/unsupported/file.rb
ehbrs_ruby_utils-0.44.0 lib/ehbrs_ruby_utils/videos2/unsupported/file.rb
ehbrs_ruby_utils-0.41.1 lib/ehbrs_ruby_utils/videos2/unsupported/file.rb
ehbrs_ruby_utils-0.41.0 lib/ehbrs_ruby_utils/videos2/unsupported/file.rb