Module: BuildpackSupport::QualifyPath
- Defined in:
- lib/buildpack_support/qualify_path.rb
Overview
Mixin with a method for qualifying a given path relative to a root
Instance Method Summary collapse
-
#qualify_path(path, root = @droplet_root) ⇒ String
Qualifies the path such that is is formatted as $PWD/<path>.
Instance Method Details
#qualify_path(path, root = @droplet_root) ⇒ String
Qualifies the path such that is is formatted as $PWD/<path>. Also ensures that the path is relative to a root, which defaults to the @droplet_root of the class.
30 31 32 |
# File 'lib/buildpack_support/qualify_path.rb', line 30 def qualify_path(path, root = @droplet_root) "$PWD/#{path.relative_path_from(root)}" end |