Module: TurboTestRubyRefinements::StringRelativePath

Defined in:
lib/turbo_test_ruby_refinements/string/relative_path.rb

Class Method Summary collapse

Class Method Details

.app_root_pathObject



15
16
17
# File 'lib/turbo_test_ruby_refinements/string/relative_path.rb', line 15

def app_root_path
  @app_root_path ||= Pathname.new(Dir.pwd)
end

.fetch(key) ⇒ Object



8
9
10
11
12
13
# File 'lib/turbo_test_ruby_refinements/string/relative_path.rb', line 8

def fetch(key)
  @path_cache ||= {}
  return @path_cache[key] if @path_cache.key?(key)

  @path_cache[key] = yield
end