Module: I18n::Tasks::Data::Adapter::JsonAdapter
- Defined in:
- lib/i18n/tasks/data/adapter/json_adapter.rb
Class Method Summary collapse
- .dump(tree, opts) ⇒ String
-
.parse(str, opts) ⇒ Hash
Locale tree.
Class Method Details
.dump(tree, opts) ⇒ String
16 17 18 |
# File 'lib/i18n/tasks/data/adapter/json_adapter.rb', line 16 def dump(tree, opts) JSON.generate(tree, parse_opts(opts)) end |
.parse(str, opts) ⇒ Hash
Returns locale tree.
11 12 13 |
# File 'lib/i18n/tasks/data/adapter/json_adapter.rb', line 11 def parse(str, opts) JSON.parse(str, parse_opts(opts)) end |