Exception: I18n::KeyExists

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/i18n/exceptions/key_exists.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#keyObject (readonly)

Returns the value of attribute key.



3
4
5
# File 'lib/i18n/exceptions/key_exists.rb', line 3

def key
  @key
end

#localeObject (readonly)

Returns the value of attribute locale.



3
4
5
# File 'lib/i18n/exceptions/key_exists.rb', line 3

def locale
  @locale
end