Method: DraftManager#move_temp_file

Defined in:
lib/draft_manager.rb

#move_temp_file(tempfile) ⇒ Object



67
68
69
70
71
72
73
74
75
# File 'lib/draft_manager.rb', line 67

def move_temp_file(tempfile)
  if system "mv #{tempfile} #{@draft_dir}"
    index_key = File.basename(tempfile)
    set_attribute(index_key, "creation_time", Time.now.to_s)
  else
    msg = "failed to move the temp file to the draft folder"
    raise RuntimeError, msg
  end
end