Module: ImportGraph::Util
- Included in:
- Parser::Autoload, Parser::Load, Parser::Main, Parser::Require, Parser::RequireRelative
- Defined in:
- lib/import_graph/util.rb
Instance Method Summary collapse
- #build_match_object(method, from, to) ⇒ Object
- #cleanup_absolute_path(dir_path, child_path) ⇒ Object
Instance Method Details
#build_match_object(method, from, to) ⇒ Object
5 6 7 |
# File 'lib/import_graph/util.rb', line 5 def build_match_object(method, from, to) { method: method, from: from, to: to } end |
#cleanup_absolute_path(dir_path, child_path) ⇒ Object
9 10 11 12 13 |
# File 'lib/import_graph/util.rb', line 9 def cleanup_absolute_path(dir_path, child_path) clean_path = child_path.gsub(dir_path, '') clean_path = clean_path[1..] if clean_path.start_with? '/' clean_path end |