class Dotfiler::Symlinker
Public Instance Methods
call(source, link_path, options = {})
click to toggle source
# File lib/dotfiler/symlinker.rb, line 5 def call(source, link_path, options = {}) check_paths!(source, link_path.parent_dir) options[:force] = true if link_path.symlink? fs.symlink(source.to_s, link_path.to_s, options) link_path end
Private Instance Methods
check_paths!(*paths)
click to toggle source
# File lib/dotfiler/symlinker.rb, line 17 def check_paths!(*paths) paths.each do |path| raise Error, "Path '#{path}' does not exist" unless path.exists? end end