module Bootsnap::CompileCache::JSON::Patch

Public Instance Methods

load_file(path, *args) click to toggle source
Calls superclass method
# File lib/bootsnap/compile_cache/json.rb, line 69
def load_file(path, *args)
  return super if args.size > 1

  if (kwargs = args.first)
    return super unless kwargs.is_a?(Hash)
    return super unless (kwargs.keys - ::Bootsnap::CompileCache::JSON.supported_options).empty?
  end

  ::Bootsnap::CompileCache::Native.fetch(
    Bootsnap::CompileCache::JSON.cache_dir,
    File.realpath(path),
    ::Bootsnap::CompileCache::JSON,
    kwargs,
  )
end