Module: AppMap::Depends::Util
Instance Method Summary collapse
- #delete_appmap(appmap_path) ⇒ Object
- #normalize_path(path, pwd: Dir.pwd) ⇒ Object
- #normalize_paths(paths, pwd: Dir.pwd) ⇒ Object
Instance Method Details
#delete_appmap(appmap_path) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/appmap/depends/util.rb', line 16 def delete_appmap(appmap_path) FileUtils.rm_rf(appmap_path) appmap_file_path = [ appmap_path, 'appmap.json' ].join('.') File.unlink(appmap_file_path) if File.exist?(appmap_file_path) rescue warn "Unable to delete AppMap: #{$!}" end |
#normalize_path(path, pwd: Dir.pwd) ⇒ Object
8 9 10 |
# File 'lib/appmap/depends/util.rb', line 8 def normalize_path(path, pwd: Dir.pwd) normalize_path_fn(pwd).(path) end |
#normalize_paths(paths, pwd: Dir.pwd) ⇒ Object
12 13 14 |
# File 'lib/appmap/depends/util.rb', line 12 def normalize_paths(paths, pwd: Dir.pwd) paths.map(&normalize_path_fn(pwd)) end |