Module: I18n::Tasks::Data::Adapter::JsonAdapter

Defined in:
lib/i18n/tasks/data/adapter/json_adapter.rb

Class Method Summary collapse

Class Method Details

.dump(tree, opts) ⇒ String

Returns:

  • (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.

Returns:

  • (Hash)

    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