Exception: Mindee::Input::Source::InvalidMimeTypeError

Inherits:
MimeTypeError
  • Object
show all
Defined in:
lib/mindee/input/sources.rb

Overview

Error sent if the file's mimetype isn't allowed

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mime_type) ⇒ InvalidMimeTypeError

Returns a new instance of InvalidMimeTypeError.

Parameters:

  • mime_type (String)


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_mimetypeString (readonly)

Returns:

  • (String)


30
31
32
# File 'lib/mindee/input/sources.rb', line 30

def invalid_mimetype
  @invalid_mimetype
end