Class ArkanisDevelopment::SimpleLocalization::LangFileNotLoaded
In: lib/errors.rb
Parent: SimpleLocalizationError

Custom error class raised if the uses tries to select a language file which is not loaded. Also stores the name of the failed language file and a list of the loaded ones.

  begin
    Language.about :xyz
  rescue LangFileNotLoaded => e
    e.failed_lang   # => :xyz
    e.loaded_langs  # => [:de, :en]
  end

Methods

new  

Attributes

failed_lang  [R] 
loaded_langs  [R] 

Public Class methods

[Source]

    # File lib/errors.rb, line 21
21:       def initialize(failed_lang, loaded_langs)
22:         @failed_lang, @loaded_lang = failed_lang, loaded_langs
23:         super "The language file \"#{failed_lang}\" is not loaded (currently " +
24:           "loaded: #{loaded_langs.join(', ')}). Please call the " +
25:           'simple_localization method at the end of your environment.rb ' +
26:           'file to initialize Simple Localization or modify this call to ' +
27:           'include the selected language.'
28:       end

[Validate]