class Audiothority::Custodian
Public Class Methods
new(custody, suspects, fileutils=FileUtils)
click to toggle source
# File lib/audiothority/custodian.rb, line 10 def initialize(custody, suspects, fileutils=FileUtils) @custody = Pathname.new(custody) @suspects = suspects @fileutils = fileutils end
Public Instance Methods
throw_in_custody()
click to toggle source
# File lib/audiothority/custodian.rb, line 16 def throw_in_custody if @custody.exist? @suspects.each do |path, _| @fileutils.copy_entry(path.to_s, @custody.join(path.basename).to_s, true) end else raise CustodyTorchedError, %("#{@custody}" seems to have been torched) end end