Exception: MediaTypes::Serialization::UnbackedAliasDefinitionError
- Inherits:
-
ConfigurationError
- Object
- StandardError
- Error
- ConfigurationError
- MediaTypes::Serialization::UnbackedAliasDefinitionError
- Defined in:
- lib/media_types/serialization/error.rb
Instance Method Summary collapse
-
#initialize(identifier, inout) ⇒ UnbackedAliasDefinitionError
constructor
A new instance of UnbackedAliasDefinitionError.
Constructor Details
#initialize(identifier, inout) ⇒ UnbackedAliasDefinitionError
Returns a new instance of UnbackedAliasDefinitionError.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/media_types/serialization/error.rb', line 73 def initialize(identifier, inout) super( "Serializer tried to define an #{inout}_alias that points to the media type identifier #{identifier} but no such #{inout} has been defined yet. Please move the #{inout} definition above the alias.\n\n" \ "Move the #{inout} definition above the alias:\n" \ "\n" \ "class MySerializer < MediaTypes::Serialization::Base\n" \ "#...\n" \ "#{inout} do\n" \ " # ...\n" \ "end\n" \ "\n" \ "#{inout}_alias 'text/html'\n" \ "# ^----- move here\n" \ 'end' ) end |