Sha256: 67f0b75dcae3be9c799f59809d63085d0b72dbaac6ca334d24644fbe4e370ed2
Contents?: true
Size: 580 Bytes
Versions: 11
Compression:
Stored size: 580 Bytes
Contents
module I18n module JS module Formatters class Base def initialize(js_extend: false, namespace: nil, pretty_print: false, prefix: nil, suffix: nil) @js_extend = js_extend @namespace = namespace @pretty_print = pretty_print @prefix = prefix @suffix = suffix end protected def format_json(translations) if @pretty_print ::JSON.pretty_generate(translations) else translations.to_json end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems