Exception: Mindee::Input::Source::InvalidMimeTypeError
- Inherits:
-
MimeTypeError
- Object
- StandardError
- MimeTypeError
- Mindee::Input::Source::InvalidMimeTypeError
- Defined in:
- lib/mindee/input/sources.rb
Overview
Error sent if the file’s mimetype isn’t allowed
Instance Attribute Summary collapse
- #invalid_mimetype ⇒ String readonly
Instance Method Summary collapse
-
#initialize(mime_type) ⇒ InvalidMimeTypeError
constructor
A new instance of InvalidMimeTypeError.
Constructor Details
#initialize(mime_type) ⇒ InvalidMimeTypeError
Returns a new instance of InvalidMimeTypeError.
33 34 35 36 |
# File 'lib/mindee/input/sources.rb', line 33 def initialize(mime_type) @invalid_mimetype = mime_type super("'#{@invalid_mimetype}' mime type not allowed, must be one of #{ALLOWED_MIME_TYPES.join(', ')}") end |
Instance Attribute Details
#invalid_mimetype ⇒ String (readonly)
30 31 32 |
# File 'lib/mindee/input/sources.rb', line 30 def invalid_mimetype @invalid_mimetype end |