class LyndaTranslatorSrt::SrtOriginal::Reader
Attributes
list_path_srt_files[R]
root_folder_name[R]
root_folder_path[R]
Public Class Methods
new(path_unzip_folder)
click to toggle source
# File lib/lynda_translator_srt/srt_original/reader.rb, line 8 def initialize(path_unzip_folder) @path_unzip_folder = path_unzip_folder end
Public Instance Methods
create_list_path_srt_files()
click to toggle source
# File lib/lynda_translator_srt/srt_original/reader.rb, line 12 def create_list_path_srt_files @list_path_srt_files = [] pathname = Pathname.new @path_unzip_folder @root_folder_path = pathname.children.first.to_s @root_folder_name = pathname.children.first.basename collect_srt pathname puts "Created list path srt files" self end
Private Instance Methods
collect_srt(path)
click to toggle source
# File lib/lynda_translator_srt/srt_original/reader.rb, line 29 def collect_srt(path) path.each_child do |child| if child.file? @list_path_srt_files << child.to_s elsif child.directory? collect_srt(child) + [child] end end end