Module: I18n::Tasks::Ar::Config

Includes:
ActiveSupport::Configurable
Defined in:
lib/i18n/tasks/ar/config.rb

Class Method Summary collapse

Class Method Details

.resetObject

Reset all configurations to defaults.



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/i18n/tasks/ar/config.rb', line 10

def self.reset
  file = 'config/i18n-tasks.yml' if File.exist?('config/i18n-tasks.yml')
  file = 'config/i18n-tasks-ar.yml' if File.exist?('config/i18n-tasks-ar.yml')

  if file
    config = YAML.load_file(file)
    self.locales = config['locales']
  else
    self.locales = ['en']
  end
end