File: helpers.rb

package info (click to toggle)
ruby-guard 2.18.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,344 kB
  • sloc: ruby: 9,256; makefile: 6
file content (13 lines) | stat: -rw-r--r-- 262 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Guard
  # @private api
  module Internals
    module Helpers
      def _relative_pathname(path)
        full_path = Pathname(path)
        full_path.relative_path_from(Pathname.pwd)
      rescue ArgumentError
        full_path
      end
    end
  end
end