Exception: Zip::DestinationExistsError

Inherits:
Error
  • Object
show all
Defined in:
lib/zip/errors.rb

Overview

Error raised when trying to extract an archive entry over an existing file.

Instance Method Summary collapse

Constructor Details

#initialize(destination) ⇒ DestinationExistsError

Returns a new instance of DestinationExistsError.



39
40
41
42
# File 'lib/zip/errors.rb', line 39

def initialize(destination)
  super()
  @destination = destination
end

Instance Method Details

#messageObject



44
45
46
47
# File 'lib/zip/errors.rb', line 44

def message
  "Cannot create file or directory '#{@destination}'. " \
  'A file already exists with that name.'
end