class Dotman::Base
Public Class Methods
current_dotman()
click to toggle source
# File lib/dotman/base.rb, line 12 def self.current_dotman File.join(ENV['HOME'], '.dotman', '.current') end
default_folder()
click to toggle source
# File lib/dotman/base.rb, line 4 def self.default_folder "#{ENV['HOME']}/.dotman/default" end
dotman_folder()
click to toggle source
# File lib/dotman/base.rb, line 8 def self.dotman_folder "#{ENV['HOME']}/.dotman" end
ensure_current_dotman_file_exists()
click to toggle source
# File lib/dotman/base.rb, line 28 def self.ensure_current_dotman_file_exists unless File.exist?(current_dotman) File.open(current_dotman, 'w') do |f| f.write('default') end end end
ensure_default_folder_exists()
click to toggle source
# File lib/dotman/base.rb, line 22 def self.ensure_default_folder_exists unless File.directory?(default_folder) FileUtils.mkdir_p(default_folder) end end
ensure_dotman_folder_exists()
click to toggle source
# File lib/dotman/base.rb, line 16 def self.ensure_dotman_folder_exists unless File.directory?(dotman_folder) FileUtils.mkdir(dotman_folder) end end