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

Create a new DestinationExistsError with the clashing destination.



48
49
50
51
# File 'lib/zip/errors.rb', line 48

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

Instance Method Details

#messageObject

The message returned by this error.



54
55
56
57
# File 'lib/zip/errors.rb', line 54

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