Exception: I18n::KeyExists
- Defined in:
- lib/i18n/exceptions/key_exists.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
Instance Method Summary collapse
-
#initialize(locale, key) ⇒ KeyExists
constructor
A new instance of KeyExists.
Constructor Details
#initialize(locale, key) ⇒ KeyExists
Returns a new instance of KeyExists.
4 5 6 7 |
# File 'lib/i18n/exceptions/key_exists.rb', line 4 def initialize(locale, key) @key, @locale = key, locale super "key exists: (#{locale}) :#{key.join('.')}" end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
3 4 5 |
# File 'lib/i18n/exceptions/key_exists.rb', line 3 def key @key end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
3 4 5 |
# File 'lib/i18n/exceptions/key_exists.rb', line 3 def locale @locale end |