Class: I18n::DuplicatedInflectionToken
- Inherits:
-
InflectionConfigurationException
- Object
- ArgumentError
- InflectionException
- InflectionConfigurationException
- I18n::DuplicatedInflectionToken
- Defined in:
- lib/i18n-inflector/errors.rb
Overview
This is raised when an inflection token of the same name is already defined in inflections tree of translation data.
Instance Attribute Summary collapse
-
#original_kind ⇒ Object
Returns the value of attribute original_kind.
Attributes inherited from InflectionConfigurationException
Attributes inherited from InflectionException
Instance Method Summary collapse
-
#initialize(locale, token, kind, original_kind) ⇒ DuplicatedInflectionToken
constructor
A new instance of DuplicatedInflectionToken.
- #message ⇒ Object
Constructor Details
#initialize(locale, token, kind, original_kind) ⇒ DuplicatedInflectionToken
Returns a new instance of DuplicatedInflectionToken.
162 163 164 165 |
# File 'lib/i18n-inflector/errors.rb', line 162 def initialize(locale, token, kind, original_kind) super(locale, token, kind) @original_kind = original_kind end |
Instance Attribute Details
#original_kind ⇒ Object
Returns the value of attribute original_kind.
160 161 162 |
# File 'lib/i18n-inflector/errors.rb', line 160 def original_kind @original_kind end |
Instance Method Details
#message ⇒ Object
167 168 169 170 171 |
# File 'lib/i18n-inflector/errors.rb', line 167 def '' << super << "token #{@token.inspect} " \ "was already assigned to the kind #{@original_kind.inspect}" end |