Class: UndriveGoogle::Transformations::Download
- Inherits:
-
Object
- Object
- UndriveGoogle::Transformations::Download
- Defined in:
- lib/undrive_google/transformations/download.rb
Overview
Download a particular version of the file.
Instance Attribute Summary collapse
-
#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.
Instance Method Summary collapse
-
#initialize(file_path, extension) ⇒ Download
constructor
A new instance of Download.
-
#process ⇒ Object
Nil.
Constructor Details
Instance Attribute Details
#extension ⇒ Object
Returns the value of attribute extension.
7 8 9 |
# File 'lib/undrive_google/transformations/download.rb', line 7 def extension @extension end |
#file ⇒ Object
Returns the value of attribute file.
7 8 9 |
# File 'lib/undrive_google/transformations/download.rb', line 7 def file @file end |
#file_path ⇒ Object
Returns the value of attribute file_path.
7 8 9 |
# File 'lib/undrive_google/transformations/download.rb', line 7 def file_path @file_path end |
Instance Method Details
#process ⇒ Object
Returns nil.
16 17 18 19 20 21 |
# File 'lib/undrive_google/transformations/download.rb', line 16 def process puts "Downloading #{file.title} as: #{extension} to: #{file_path}" if Options.instance.verbose file.export_as_file(file_path, extension) nil end |