Method: Gjp::BaseCommand#format_path
- Defined in:
- lib/gjp/commands/base.rb
#format_path(path, project) ⇒ Object
generates a version of path relative to the current directory
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/gjp/commands/base.rb', line 59 def format_path(path, project) full_path = ( if Pathname.new(path).relative? File.join(project.full_path, path) else path end ) Pathname.new(full_path).relative_path_from(Pathname.new(Dir.pwd)) end |