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.
145 146 147 148 149 150 |
# File 'lib/i18n-inflector/errors.rb', line 145 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 end |
Instance Method Details
#message ⇒ Object
152 153 154 |
# File 'lib/i18n-inflector/errors.rb', line 152 def '' << super << 'pattern is malformed; token count differs from kind count' end |