Class: Localize::YAMLadapter
- Inherits:
-
Object
- Object
- Localize::YAMLadapter
- Defined in:
- lib/localize/adapters/yaml.rb
Class Method Summary collapse
Class Method Details
.get_trans ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/localize/adapters/yaml.rb', line 6 def self.get_trans tr = {} Dir.glob(File.join(Localize::location, "#{Localize::locale.to_s}.yml")).each do |file| f = (RUBY_VERSION < '1.9') ? ::File.open(file) : ::File.open(file, 'r:utf-8') tr.merge! ::YAML.load(f) end tr end |