Module: I18n::Processes::Data::Adapter::YamlAdapter
- Defined in:
- lib/i18n/processes/data/adapter/yaml_adapter.rb
Class Method Summary collapse
- .dump(tree, options) ⇒ String
-
.parse(str, options) ⇒ Hash
Locale tree.
Class Method Details
.dump(tree, options) ⇒ String
20 21 22 |
# File 'lib/i18n/processes/data/adapter/yaml_adapter.rb', line 20 def dump(tree, ) tree.to_yaml( || {}) end |
.parse(str, options) ⇒ Hash
Returns locale tree.
10 11 12 13 14 15 16 17 |
# File 'lib/i18n/processes/data/adapter/yaml_adapter.rb', line 10 def parse(str, ) if YAML.method(:load).arity.abs == 2 YAML.load(str, || {}) else # older jruby and rbx 2.2.7 do not accept options YAML.load(str) end end |