Method: Myco::Backtrace#try_gem_path
- Defined in:
- lib/myco/backtrace.rb
#try_gem_path(file) ⇒ Object
If file is in one of the GEM_PATHs, mutate the string and return true
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/myco/backtrace.rb', line 46 def try_gem_path file @gem_paths.each do |gem_path| if file.start_with? gem_path and not gem_path.empty? file.sub! File.join(gem_path, 'gems'), '' file.sub! %r{/[^/]*/}, '' return true end end return false end |