Class: UndriveGoogle::Transformations::Unzip
- Inherits:
-
Object
- Object
- UndriveGoogle::Transformations::Unzip
- Defined in:
- lib/undrive_google/transformations/unzip.rb
Overview
Download a particular version of the file.
Instance Attribute Summary collapse
-
#file_path ⇒ Object
Returns the value of attribute file_path.
-
#html_path ⇒ Object
Returns the value of attribute html_path.
Instance Method Summary collapse
-
#initialize(file_path) ⇒ Unzip
constructor
A new instance of Unzip.
-
#process ⇒ Object
Nil.
Constructor Details
#initialize(file_path) ⇒ Unzip
Returns a new instance of Unzip.
9 10 11 |
# File 'lib/undrive_google/transformations/unzip.rb', line 9 def initialize(file_path) @file_path = file_path end |
Instance Attribute Details
#file_path ⇒ Object
Returns the value of attribute file_path.
7 8 9 |
# File 'lib/undrive_google/transformations/unzip.rb', line 7 def file_path @file_path end |
#html_path ⇒ Object
Returns the value of attribute html_path.
7 8 9 |
# File 'lib/undrive_google/transformations/unzip.rb', line 7 def html_path @html_path end |
Instance Method Details
#process ⇒ Object
Returns nil.
14 15 16 17 18 19 20 21 22 |
# File 'lib/undrive_google/transformations/unzip.rb', line 14 def process return unless Options.instance.unzip puts "Unzipping #{file_path}" if Options.instance.verbose extract_zip(file_path, destination) puts "Unzipped #{file_path} to #{html_path}" if Options.instance.verbose nil end |