Sha256: ca855f4a07af571d9106bb1c1a58ff2f81203a455479fe8c4f52f16de325f287
Contents?: true
Size: 330 Bytes
Versions: 14
Compression:
Stored size: 330 Bytes
Contents
# frozen_string_literal: true module JSONSchemer class CachedResolver def initialize(&resolver) @resolver = resolver @cache = {} end def call(*args) @cache[args] = @resolver.call(*args) unless @cache.key?(args) @cache[args] end end class CachedRefResolver < CachedResolver; end end
Version data entries
14 entries across 14 versions & 1 rubygems