Exception: MediaTypeOutputNotImplementedError

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



31
32
33
34
35
# File 'lib/distorted-floor/error_code.rb', line 31

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

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



30
31
32
# File 'lib/distorted-floor/error_code.rb', line 30

def context
  @context
end

#typeObject (readonly)

Returns the value of attribute type.



30
31
32
# File 'lib/distorted-floor/error_code.rb', line 30

def type
  @type
end

Instance Method Details

#messageObject



37
38
39
# File 'lib/distorted-floor/error_code.rb', line 37

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