Exception: Zip::EntrySizeError

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

Overview

Error raised if an entry is larger on extraction than it is advertised to be.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entry) ⇒ EntrySizeError

Create a new EntrySizeError with the specified entry.



101
102
103
104
# File 'lib/zip/errors.rb', line 101

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

Instance Attribute Details

#entryObject (readonly)

The entry that has caused this error.



98
99
100
# File 'lib/zip/errors.rb', line 98

def entry
  @entry
end

Instance Method Details

#messageObject

The message returned by this error.



107
108
109
# File 'lib/zip/errors.rb', line 107

def message
  "Entry '#{@entry.name}' should be #{@entry.size}B, but is larger when inflated."
end