Exception: Uniword::CorruptedFileError
- Defined in:
- lib/uniword/errors.rb
Overview
Raised when a file is corrupted or malformed
Instance Attribute Summary collapse
-
#path ⇒ String
readonly
The file path.
-
#reason ⇒ String
readonly
The reason.
Instance Method Summary collapse
-
#initialize(path, reason) ⇒ CorruptedFileError
constructor
A new instance of CorruptedFileError.
Constructor Details
#initialize(path, reason) ⇒ CorruptedFileError
Returns a new instance of CorruptedFileError.
40 41 42 43 44 |
# File 'lib/uniword/errors.rb', line 40 def initialize(path, reason) super("Corrupted file #{path}: #{reason}") @path = path @reason = reason end |
Instance Attribute Details
#path ⇒ String (readonly)
Returns The file path.
47 48 49 |
# File 'lib/uniword/errors.rb', line 47 def path @path end |
#reason ⇒ String (readonly)
Returns The reason.
50 51 52 |
# File 'lib/uniword/errors.rb', line 50 def reason @reason end |