Module: RailsRoutesAnalyzer::GemManager
- Extended by:
- GemManager
- Included in:
- GemManager
- Defined in:
- lib/rails_routes_analyzer/gem_manager.rb
Instance Method Summary collapse
-
#clean_gem_path(location) ⇒ String
Replaces gem locations in file paths with the name of the gem.
-
#identify_gem(location) ⇒ String
Identifies a gem based on a location from a backtrace.
Instance Method Details
#clean_gem_path(location) ⇒ String
Replaces gem locations in file paths with the name of the gem.
9 10 11 12 13 |
# File 'lib/rails_routes_analyzer/gem_manager.rb', line 9 def clean_gem_path(location) location.gsub(gem_path_prefix_cleanup_regex) do |val| gem_path_prefix_replacements[val] || val end end |
#identify_gem(location) ⇒ String
Identifies a gem based on a location from a backtrace.
19 20 21 |
# File 'lib/rails_routes_analyzer/gem_manager.rb', line 19 def identify_gem(location) gem_locations[location[gem_locations_regexp]] end |