module Helpers

Public Instance Methods

abs(rel_path) click to toggle source
# File lib/sheldon/helpers.rb, line 4
def abs(rel_path)
  File.expand_path(rel_path).to_s
end
add_home(path) click to toggle source
# File lib/sheldon/helpers.rb, line 8
def add_home(path)
  abs_home = File.expand_path("~")
  File.join(abs_home, path).to_s
end
remove_home(path) click to toggle source
# File lib/sheldon/helpers.rb, line 13
def remove_home(path)
  home_path = Pathname(File.expand_path("~"))
  Pathname(path).relative_path_from(home_path).to_s
end