Sha256: 504e1cd93b76126af3be013bb3ff782f2594bdbac2d4901bc4700eb8a06c8a69
Contents?: true
Size: 552 Bytes
Versions: 6
Compression:
Stored size: 552 Bytes
Contents
# frozen_string_literal: true require "singleton" module I18n module JS # @api private module Private # Caching implementation for I18n::JS.config # # @api private class ConfigStore include Singleton def fetch return @config if @config yield.tap do |obj| raise ArgumentError, "unexpected falsy object from block" unless obj @config = obj end end def flush_cache @config = nil end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems