Sha256: 9024a07b0039c06651c929901f571a7c0bd84714301f5425ffad22e72f86afce
Contents?: true
Size: 293 Bytes
Versions: 20
Compression:
Stored size: 293 Bytes
Contents
# frozen_string_literal: true module JSONSchemer class CachedRefResolver def initialize(&ref_resolver) @ref_resolver = ref_resolver @cache = {} end def call(uri) @cache[uri] = @ref_resolver.call(uri) unless @cache.key?(uri) @cache[uri] end end end
Version data entries
20 entries across 20 versions & 1 rubygems