Class: Bootsnap::LoadPathCache::RealpathCache
- Inherits:
-
Object
- Object
- Bootsnap::LoadPathCache::RealpathCache
- Defined in:
- lib/bootsnap/load_path_cache/realpath_cache.rb
Instance Method Summary collapse
- #call(*key) ⇒ Object
-
#initialize ⇒ RealpathCache
constructor
A new instance of RealpathCache.
Constructor Details
#initialize ⇒ RealpathCache
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 |