Class: Appydave::Tools::SubtitleMaster::Clean
- Inherits:
-
Object
- Object
- Appydave::Tools::SubtitleMaster::Clean
- Defined in:
- lib/appydave/tools/subtitle_master/clean.rb
Overview
Clean and normalize subtitles
Instance Method Summary collapse
- #clean ⇒ Object
-
#initialize(file_path) ⇒ Clean
constructor
A new instance of Clean.
Constructor Details
#initialize(file_path) ⇒ Clean
Returns a new instance of Clean.
8 9 10 |
# File 'lib/appydave/tools/subtitle_master/clean.rb', line 8 def initialize(file_path) @file_path = file_path end |
Instance Method Details
#clean ⇒ Object
12 13 14 15 16 |
# File 'lib/appydave/tools/subtitle_master/clean.rb', line 12 def clean content = File.read(@file_path, encoding: 'UTF-8') content = remove_underscores(content) normalize_lines(content) end |