Sha256: 0ec5d2b7a39073d285e7224be574d5373e2deafa8ae07083bb2f1dc71fae4923

Contents?: true

Size: 461 Bytes

Versions: 12

Compression:

Stored size: 461 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'
require 'ehbrs_ruby_utils/fs/to_file_format'

module EhbrsRubyUtils
  module Videos
    module Subtitles
      class Sanitize < ::EhbrsRubyUtils::Fs::ToFileFormat
        class WithTermMatcher
          common_constructor :term

          def process(lines)
            lines.map(&:downcase).any? { |line| line.include?(term) } ? nil : lines
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ehbrs_ruby_utils-0.44.3 lib/ehbrs_ruby_utils/videos/subtitles/sanitize/with_term_matcher.rb
ehbrs_ruby_utils-0.44.2 lib/ehbrs_ruby_utils/videos/subtitles/sanitize/with_term_matcher.rb
ehbrs_ruby_utils-0.44.1 lib/ehbrs_ruby_utils/videos/subtitles/sanitize/with_term_matcher.rb
ehbrs_ruby_utils-0.44.0 lib/ehbrs_ruby_utils/videos/subtitles/sanitize/with_term_matcher.rb
ehbrs_ruby_utils-0.41.1 lib/ehbrs_ruby_utils/videos/subtitles/sanitize/with_term_matcher.rb
ehbrs_ruby_utils-0.41.0 lib/ehbrs_ruby_utils/videos/subtitles/sanitize/with_term_matcher.rb
ehbrs_ruby_utils-0.40.0 lib/ehbrs_ruby_utils/videos/subtitles/sanitize/with_term_matcher.rb
ehbrs_ruby_utils-0.39.0 lib/ehbrs_ruby_utils/videos/subtitles/sanitize/with_term_matcher.rb
ehbrs_ruby_utils-0.38.0 lib/ehbrs_ruby_utils/videos/subtitles/sanitize/with_term_matcher.rb
ehbrs_ruby_utils-0.37.0 lib/ehbrs_ruby_utils/videos/subtitles/sanitize/with_term_matcher.rb
ehbrs_ruby_utils-0.36.1 lib/ehbrs_ruby_utils/videos/subtitles/sanitize/with_term_matcher.rb
ehbrs_ruby_utils-0.36.0 lib/ehbrs_ruby_utils/videos/subtitles/sanitize/with_term_matcher.rb