module Dotter::Utilities

Public Instance Methods

all_package_names() click to toggle source
# File lib/dotter/utilities.rb, line 30
def all_package_names
  directory = Pathname.new(@@dotfiles_path)
  directories = directory.children.select(&:directory?)
  package_names = []
  directories.each do |directory|
    package_names.push(directory.basename)
  end
  package_names
end
dotfiles_path() click to toggle source
# File lib/dotter/utilities.rb, line 5
def dotfiles_path
  @@dotfiles_path
end
dotter_path() click to toggle source
# File lib/dotter/utilities.rb, line 18
def dotter_path
  @@dotter_path
end
go_to_dotfiles() click to toggle source
# File lib/dotter/utilities.rb, line 9
def go_to_dotfiles
  Dir.chdir(@@dotfiles_path)
end
index_path(package) click to toggle source
# File lib/dotter/utilities.rb, line 26
def index_path(package)
  @@dotter_path + '.dotter/indexes/' + package
end
package_path(package) click to toggle source
# File lib/dotter/utilities.rb, line 13
def package_path(package)
  @@dotfiles_path + package
end
repo_path(package) click to toggle source
# File lib/dotter/utilities.rb, line 22
def repo_path(package)
  @@dotter_path + '.dotter/gitrepos/' + package
end