Class: I18n::ComplexPatternMalformed
- Inherits:
-
InflectionPatternException
- Object
- ArgumentError
- InflectionException
- InflectionPatternException
- I18n::ComplexPatternMalformed
- Defined in:
- lib/i18n-inflector/errors.rb
Overview
This is raised when a complex inflection pattern is malformed and cannot be reduced to set of regular patterns.
Instance Attribute Summary
Attributes inherited from InflectionPatternException
Attributes inherited from InflectionException
Instance Method Summary collapse
-
#initialize(locale, pattern, token, complex_kind) ⇒ ComplexPatternMalformed
constructor
A new instance of ComplexPatternMalformed.
- #message ⇒ Object
Constructor Details
#initialize(locale, pattern, token, complex_kind) ⇒ ComplexPatternMalformed
Returns a new instance of ComplexPatternMalformed.
170 171 172 173 174 175 |
# File 'lib/i18n-inflector/errors.rb', line 170 def initialize(locale, pattern, token, complex_kind) unless pattern.include?(I18n::Inflector::Config::Markers::PATTERN) pattern = I18n::Inflector::Config::Markers::PATTERN + "#{complex_kind}{#{pattern}}" end super(locale, pattern, token, complex_kind) end |
Instance Method Details
#message ⇒ Object
177 178 179 |
# File 'lib/i18n-inflector/errors.rb', line 177 def "" << super << "pattern is malformed; token count differs from kind count" end |