Class: I18n::BadInflectionAlias
- Inherits:
-
InflectionConfigurationException
- Object
- ArgumentError
- InflectionException
- InflectionConfigurationException
- I18n::BadInflectionAlias
- Defined in:
- lib/i18n-inflector/errors.rb
Overview
This is raised when an alias for an inflection token points to a token that doesn’t exists. It is also raised when default token of some kind points to a non-existent token.
Instance Attribute Summary collapse
-
#pointer ⇒ Object
Returns the value of attribute pointer.
Attributes inherited from InflectionConfigurationException
Attributes inherited from InflectionException
Instance Method Summary collapse
-
#initialize(locale, token, kind, pointer) ⇒ BadInflectionAlias
constructor
A new instance of BadInflectionAlias.
- #message ⇒ Object
Constructor Details
#initialize(locale, token, kind, pointer) ⇒ BadInflectionAlias
Returns a new instance of BadInflectionAlias.
180 181 182 183 |
# File 'lib/i18n-inflector/errors.rb', line 180 def initialize(locale, token, kind, pointer) super(locale, token, kind) @pointer = pointer end |
Instance Attribute Details
#pointer ⇒ Object
Returns the value of attribute pointer.
178 179 180 |
# File 'lib/i18n-inflector/errors.rb', line 178 def pointer @pointer end |
Instance Method Details
#message ⇒ Object
185 186 187 188 189 190 |
# File 'lib/i18n-inflector/errors.rb', line 185 def what = (token == :default) ? 'default token' : "alias #{@token.inspect}" '' << super << "the #{what} " \ "points to an unknown token #{@pointer.inspect}" end |