Class: EhbrsRubyUtils::Videos::Subtitles::Sanitize

Inherits:
Fs::ToFileFormat show all
Defined in:
lib/ehbrs_ruby_utils/videos/subtitles/sanitize.rb,
lib/ehbrs_ruby_utils/videos/subtitles/sanitize/content_sanitizer.rb,
lib/ehbrs_ruby_utils/videos/subtitles/sanitize/with_term_matcher.rb,
lib/ehbrs_ruby_utils/videos/subtitles/sanitize/with_pattern_matcher.rb

Defined Under Namespace

Classes: ContentSanitizer, WithPatternMatcher, WithTermMatcher

Instance Method Summary collapse

Methods inherited from Fs::ToFileFormat

convert_self, convert_to_file, convert_to_string

Instance Method Details

#runObject



13
14
15
16
# File 'lib/ehbrs_ruby_utils/videos/subtitles/sanitize.rb', line 13

def run
  sanitize_content
  convert_to_windows_ptbr
end

#subtitle?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/ehbrs_ruby_utils/videos/subtitles/sanitize.rb', line 18

def subtitle?
  text? && file.extname == '.srt'
end