module PathHelper

Public Instance Methods

ensure_path(path) click to toggle source
# File lib/path_helper.rb, line 21
def ensure_path(path)
  path.is_a?(Pathname) ? path : Pathname.new(path)
end
in_repo(path) click to toggle source
# File lib/path_helper.rb, line 17
def in_repo(path)
  repo_path.join(path)
end
repo_path() click to toggle source
# File lib/path_helper.rb, line 9
def repo_path
  @repo_path
end
repo_path=(repo_path) click to toggle source
# File lib/path_helper.rb, line 5
def repo_path=(repo_path)
  @repo_path = repo_path
end
repo_relative(path) click to toggle source
# File lib/path_helper.rb, line 13
def repo_relative(path)
  ensure_path(path).relative_path_from(repo_path)
end