Exception: MediaTypeOutputNotImplementedError

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

Instance Attribute Summary collapse

Attributes inherited from MediaTypeNotImplementedError

#name

Instance Method Summary collapse

Constructor Details

#initialize(name, type, context) ⇒ MediaTypeOutputNotImplementedError

Returns a new instance of MediaTypeOutputNotImplementedError.



26
27
28
29
30
# File 'lib/distorted/error_code.rb', line 26

def initialize(name, type, context)
  super(name)
  @type = type
  @context = context
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



25
26
27
# File 'lib/distorted/error_code.rb', line 25

def context
  @context
end

#typeObject (readonly)

Returns the value of attribute type.



25
26
27
# File 'lib/distorted/error_code.rb', line 25

def type
  @type
end

Instance Method Details

#messageObject



32
33
34
# File 'lib/distorted/error_code.rb', line 32

def message
  "Unable to save #{name} as #{type.to_s} from #{context}"
end