Class: UndriveGoogle::Actions::Liberate
- Inherits:
-
Object
- Object
- UndriveGoogle::Actions::Liberate
- Extended by:
- Forwardable
- Defined in:
- lib/undrive_google/actions/liberate.rb
Overview
Liberate a file, and transform it
Instance Attribute Summary collapse
-
#dir ⇒ Object
Returns the value of attribute dir.
-
#extension ⇒ Object
Returns the value of attribute extension.
-
#file ⇒ Object
Returns the value of attribute file.
-
#file_path ⇒ Object
Returns the value of attribute file_path.
-
#tr ⇒ Object
Returns the value of attribute tr.
Instance Method Summary collapse
-
#initialize(extension) ⇒ Liberate
constructor
A new instance of Liberate.
Constructor Details
#initialize(extension) ⇒ Liberate
Returns a new instance of Liberate.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/undrive_google/actions/liberate.rb', line 18 def initialize(extension) @extension = extension.to_s @file = Session.instance.file @dir = Options.instance.dir @file_path = "#{@dir}/#{name}" @tr = Transformation.new(download: Transformations::Download.new(@file_path, @extension)) return unless zip? if Options.instance.unzip @tr.unzip = Transformations::Unzip.new(@file_path) @tr.fix_html = Transformations::FixHtml.new(@tr.unzip) @tr.rename_html = Transformations::RenameHtml.new(@tr.unzip) if Options.instance.rename[:html] end @tr.delete_zip = Transformations::DeleteZip.new(@file_path) unless Options.instance.keep_zip end |
Instance Attribute Details
#dir ⇒ Object
Returns the value of attribute dir.
9 10 11 |
# File 'lib/undrive_google/actions/liberate.rb', line 9 def dir @dir end |
#extension ⇒ Object
Returns the value of attribute extension.
9 10 11 |
# File 'lib/undrive_google/actions/liberate.rb', line 9 def extension @extension end |
#file ⇒ Object
Returns the value of attribute file.
9 10 11 |
# File 'lib/undrive_google/actions/liberate.rb', line 9 def file @file end |
#file_path ⇒ Object
Returns the value of attribute file_path.
9 10 11 |
# File 'lib/undrive_google/actions/liberate.rb', line 9 def file_path @file_path end |
#tr ⇒ Object
Returns the value of attribute tr.
9 10 11 |
# File 'lib/undrive_google/actions/liberate.rb', line 9 def tr @tr end |