Class: Bundler::Stats::FilePathResolver

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler/stats/file_path_resolver.rb

Constant Summary collapse

FILES_MAP =
{
  "gems.rb" => "gems.locked",
  "Gemfile" => "Gemfile.lock"
}

Instance Method Summary collapse

Constructor Details

#initialize(specific_gemfile_path = nil) ⇒ FilePathResolver

Returns a new instance of FilePathResolver.



9
10
11
# File 'lib/bundler/stats/file_path_resolver.rb', line 9

def initialize(specific_gemfile_path = nil)
  @specific_gemfile_path = specific_gemfile_path
end

Instance Method Details

#gemfile_pathObject



13
14
15
# File 'lib/bundler/stats/file_path_resolver.rb', line 13

def gemfile_path
  resolve_file_path(FILES_MAP.keys, specific_gemfile_path)
end

#lockfile_pathObject



17
18
19
# File 'lib/bundler/stats/file_path_resolver.rb', line 17

def lockfile_path
  resolve_file_path(FILES_MAP.values, resolve_lockfile_path)
end