class LyndaTranslatorSrt::Zipper
Attributes
zipname[R]
Public Class Methods
new(params)
click to toggle source
# File lib/lynda_translator_srt/zipper.rb, line 7 def initialize(params) @params = params end
Public Instance Methods
zip()
click to toggle source
# File lib/lynda_translator_srt/zipper.rb, line 11 def zip @zipname = "#{@params[:root_folder_name]}.zip" path_zipfile = @params[:save_to] + @zipname @zipped = system "7z a -tzip #{path_zipfile} -w #{@params[:root_folder_path]}" puts @params[:root_folder_path] cleaner if zipped? if zipped? puts "Zipped course" self else raise("Unfortunately we doesn't zipped transcript to this course.") end end
zipped?()
click to toggle source
# File lib/lynda_translator_srt/zipper.rb, line 29 def zipped? @zipped end
Private Instance Methods
cleaner()
click to toggle source
# File lib/lynda_translator_srt/zipper.rb, line 35 def cleaner FileUtils::rm_r @params[:path_unzip_folder] end