Class: EncoderTools::CLI::Subtitles::SpellCheck
- Defined in:
- lib/encoder-tools/cli/subtitles/spell_check.rb
Constant Summary collapse
- DEFAULT_DICT =
'/usr/share/dict/words'.freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#parse, #parser, parser, #read, #write
Methods inherited from Base
Constructor Details
This class inherits a constructor from EncoderTools::CLI::Base
Instance Method Details
#run ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/encoder-tools/cli/subtitles/spell_check.rb', line 9 def run write(read.each do |subtitle| subtitle.text.gsub!(/\w+/) do |word| fix_word(word) end end) end |