Class: Bootsnap::LoadPathCache::RealpathCache

Inherits:
Object
  • Object
show all
Defined in:
lib/bootsnap/load_path_cache/realpath_cache.rb

Instance Method Summary collapse

Constructor Details

#initializeRealpathCache

Returns a new instance of RealpathCache.



6
7
8
# File 'lib/bootsnap/load_path_cache/realpath_cache.rb', line 6

def initialize
  @cache = Hash.new { |h, k| h[k] = realpath(*k) }
end

Instance Method Details

#call(*key) ⇒ Object



10
11
12
# File 'lib/bootsnap/load_path_cache/realpath_cache.rb', line 10

def call(*key)
  @cache[key]
end