Class: UndriveGoogle::Transformations::DeleteZip

Inherits:
Object
  • Object
show all
Defined in:
lib/undrive_google/transformations/delete_zip.rb

Overview

Delete the downloaded zip file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_path) ⇒ DeleteZip

Returns a new instance of DeleteZip.



9
10
11
# File 'lib/undrive_google/transformations/delete_zip.rb', line 9

def initialize(file_path)
  @file_path = file_path
end

Instance Attribute Details

#file_pathObject

Returns the value of attribute file_path.



7
8
9
# File 'lib/undrive_google/transformations/delete_zip.rb', line 7

def file_path
  @file_path
end

Instance Method Details

#processObject

Returns nil.

Returns:

  • nil



14
15
16
17
18
19
# File 'lib/undrive_google/transformations/delete_zip.rb', line 14

def process
  puts "Deleting #{file_path}" if Options.instance.verbose
  File.delete(file_path)

  nil
end