Module: Ace::Task::Molecules::PathUtils
- Defined in:
- lib/ace/task/molecules/path_utils.rb
Overview
Shared path utilities for task plan components.
Class Method Summary collapse
Class Method Details
.relative_path(path) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/ace/task/molecules/path_utils.rb', line 10 def relative_path(path) absolute = File.(path) cwd = File.(Dir.pwd) return absolute unless absolute.start_with?("#{cwd}/") absolute.delete_prefix("#{cwd}/") end |