From 3d14f8b8557d40dfd519e037af784a822971e1f3 Mon Sep 17 00:00:00 2001 From: Michael Witrant Date: Sun, 16 Jan 2011 13:08:10 +0100 Subject: [PATCH] clarified doc for enrypt/decrypt_file (cipher_file is not documented and available options were not given) --- lib/ezcrypto.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/ezcrypto.rb b/lib/ezcrypto.rb index a9ca174..f7d7c8e 100644 --- a/lib/ezcrypto.rb +++ b/lib/ezcrypto.rb @@ -364,9 +364,12 @@ def on_cipher(&block) =begin rdoc -Encrypt a file 'inplace' and add a suffix -see #cipher_file. +Encrypt a file 'inplace' and add a suffix. IMPORTANT: The inputfile will be deleted by default. + +Options: +* suffix: string added to src if tgt is not provided. Default: '.ez' +* autoclean: remove the source file if true. Default: 'true' =end def encrypt_file(src, tgt=nil, options = {} ) options = { :suffix => '.ez', :autoclean => 'true' }.update(options) @@ -377,8 +380,11 @@ def encrypt_file(src, tgt=nil, options = {} ) =begin rdoc Decrypt a file 'inplace' and remove a suffix -see #cipher_file IMPORTANT: The inputfile will be deleted by default. + +Options: +* suffix: string removed from src if tgt is not provided. Default: '.ez' +* autoclean: remove the source file if true. Default: 'true' =end def decrypt_file(src, tgt=nil, options = {} ) options = { :suffix => '.ez', :autoclean => 'true' }.update(options)