Sha256: f394f5d9e8a5aa88878aad072243455aa5ee0a3eb29befe96d843a3dce0f6a24
Contents?: true
Size: 610 Bytes
Versions: 5
Compression:
Stored size: 610 Bytes
Contents
require 'i18n/tasks/version' require 'i18n/tasks/railtie' require 'active_support/hash_with_indifferent_access' module I18n module Tasks mattr_accessor :get_locale_data self.get_locale_data = lambda { |locale| YAML.load_file("config/locales/#{locale}.yml") } CONFIG_FILE = 'config/i18n-tasks.yml' class << self def config @config ||= begin file = File.read(CONFIG_FILE) if File.exists?(CONFIG_FILE) file = YAML.load(file) if file.present? HashWithIndifferentAccess.new.merge(file.presence || {}) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
i18n-tasks-0.1.4 | lib/i18n/tasks.rb |
i18n-tasks-0.1.3 | lib/i18n/tasks.rb |
i18n-tasks-0.1.2 | lib/i18n/tasks.rb |
i18n-tasks-0.1.1 | lib/i18n/tasks.rb |
i18n-tasks-0.1.0 | lib/i18n/tasks.rb |