Exception: MediaTypeNotImplementedError

Inherits:
StandardDistorteDError show all
Defined in:
lib/distorted/error_code.rb

Overview

The built-in NotImplementedError is for “when a feature is not implemented on the current platform”, so make our own more appropriate ones.

Direct Known Subclasses

MediaTypeOutputNotImplementedError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ MediaTypeNotImplementedError

Returns a new instance of MediaTypeNotImplementedError.



14
15
16
17
# File 'lib/distorted/error_code.rb', line 14

def initialize(name)
  super
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



13
14
15
# File 'lib/distorted/error_code.rb', line 13

def name
  @name
end

Instance Method Details

#messageObject



19
20
21
# File 'lib/distorted/error_code.rb', line 19

def message
  "No supported media type for #{name}"
end