class Dotfiler::Copier
Public Instance Methods
call(source, target, options = {})
click to toggle source
# File lib/dotfiler/copier.rb, line 5 def call(source, target, options = {}) check_paths!(source, target.parent_dir) fs.copy(source.to_s, target.to_s, options) target.join(source.name) end
Private Instance Methods
check_paths!(*paths)
click to toggle source
# File lib/dotfiler/copier.rb, line 15 def check_paths!(*paths) paths.each do |path| raise Error, "Path '#{path}' does not exist" unless path.exists? end end