Class: I18n::InflectionPatternException Abstract
- Inherits:
-
InflectionException
- Object
- ArgumentError
- InflectionException
- I18n::InflectionPatternException
- Defined in:
- lib/i18n-inflector/errors.rb
Overview
This class is abstract.
It is a parent class for all exceptions related to inflection patterns that are processed.
Direct Known Subclasses
ComplexPatternMalformed, InvalidInflectionKind, InvalidInflectionOption, InvalidInflectionToken, InvalidOptionForKind, MisplacedInflectionToken
Instance Attribute Summary collapse
-
#pattern ⇒ Object
Returns the value of attribute pattern.
Attributes inherited from InflectionException
Instance Method Summary collapse
-
#initialize(locale, pattern, token, kind) ⇒ InflectionPatternException
constructor
A new instance of InflectionPatternException.
- #message ⇒ Object
Constructor Details
#initialize(locale, pattern, token, kind) ⇒ InflectionPatternException
Returns a new instance of InflectionPatternException.
33 34 35 36 |
# File 'lib/i18n-inflector/errors.rb', line 33 def initialize(locale, pattern, token, kind) super(locale, token, kind) @pattern = pattern end |
Instance Attribute Details
#pattern ⇒ Object
Returns the value of attribute pattern.
31 32 33 |
# File 'lib/i18n-inflector/errors.rb', line 31 def pattern @pattern end |
Instance Method Details
#message ⇒ Object
38 39 40 41 |
# File 'lib/i18n-inflector/errors.rb', line 38 def mkey = @key.nil? ? "" : ".#{@key}" @pattern.nil? ? "" : "#{@locale}#{mkey}: #{@pattern} - " end |