Method: ActiveSupport::EncryptedFile#write

Defined in:
activesupport/lib/active_support/encrypted_file.rb

#write(contents) ⇒ Object



78
79
80
81
# File 'activesupport/lib/active_support/encrypted_file.rb', line 78

def write(contents)
  IO.binwrite "#{content_path}.tmp", encrypt(contents)
  FileUtils.mv "#{content_path}.tmp", content_path
end