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
30 31 32 33 |
# File 'lib/i18n-inflector/errors.rb', line 30 def initialize(locale, pattern, token, kind) super(locale, token, kind) @pattern = pattern end |
Instance Attribute Details
#pattern ⇒ Object
Returns the value of attribute pattern.
28 29 30 |
# File 'lib/i18n-inflector/errors.rb', line 28 def pattern @pattern end |
Instance Method Details
#message ⇒ Object
35 36 37 38 |
# File 'lib/i18n-inflector/errors.rb', line 35 def mkey = @key.nil? ? '' : ".#{@key}" @pattern.nil? ? '' : "#{@locale}#{mkey}: #{@pattern} - " end |