Class: LinkedinV2::Files::Destroyer

Inherits:
Object
  • Object
show all
Defined in:
lib/linkedin_v2/files/destroyer.rb

Class Method Summary collapse

Class Method Details

.call(file) ⇒ Object

file: File object



5
6
7
8
9
# File 'lib/linkedin_v2/files/destroyer.rb', line 5

def self.call(file)
  path_to_file = file.path

  File.delete(path_to_file) if File.exist?(path_to_file.to_s)
end