Exception: Uniword::InvalidFormatError
- Defined in:
- lib/uniword/errors.rb
Overview
Raised when a file format is invalid or unsupported
Instance Attribute Summary collapse
-
#format ⇒ Symbol, String
readonly
The format.
-
#path ⇒ String
readonly
The file path.
Instance Method Summary collapse
-
#initialize(path, format) ⇒ InvalidFormatError
constructor
A new instance of InvalidFormatError.
Constructor Details
#initialize(path, format) ⇒ InvalidFormatError
Returns a new instance of InvalidFormatError.
23 24 25 26 27 |
# File 'lib/uniword/errors.rb', line 23 def initialize(path, format) super("Invalid or unsupported format '#{format}' for file: #{path}") @path = path @format = format end |
Instance Attribute Details
#format ⇒ Symbol, String (readonly)
Returns The format.
33 34 35 |
# File 'lib/uniword/errors.rb', line 33 def format @format end |
#path ⇒ String (readonly)
Returns The file path.
30 31 32 |
# File 'lib/uniword/errors.rb', line 30 def path @path end |