Class: I18n::InvalidInflectionKind

Inherits:
InflectionPatternException show all
Defined in:
lib/i18n-inflector/errors.rb

Overview

This is raised when a kind given in a pattern is invalid (empty, reserved or containing a reserved character).

Instance Attribute Summary

Attributes inherited from InflectionPatternException

#pattern

Attributes inherited from InflectionException

#key, #kind, #token

Instance Method Summary collapse

Constructor Details

#initialize(locale, pattern, kind) ⇒ InvalidInflectionKind

Returns a new instance of InvalidInflectionKind.



139
140
141
# File 'lib/i18n-inflector/errors.rb', line 139

def initialize(locale, pattern, kind)
  super(locale, pattern, nil, kind)
end

Instance Method Details

#messageObject



143
144
145
# File 'lib/i18n-inflector/errors.rb', line 143

def message
  "" << super << "kind #{@kind.to_s.inspect} is invalid"
end