Exception: MediaTypeNotImplementedError

Inherits:
DistorteDError show all
Defined in:
lib/distorted-floor/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.



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

def initialize(name)
  super
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



18
19
20
# File 'lib/distorted-floor/error_code.rb', line 18

def name
  @name
end

Instance Method Details

#messageObject



24
25
26
# File 'lib/distorted-floor/error_code.rb', line 24

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