class Dotfiler::Mover
Public Instance Methods
call(source, target, options = { secure: true })
click to toggle source
# File lib/dotfiler/mover.rb, line 5 def call(source, target, options = { secure: true }) check_paths!(source, target.parent_dir) fs.move(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/mover.rb, line 15 def check_paths!(*paths) paths.each do |path| raise Error, "Path '#{path}' does not exist" unless path.exists? end end