Method: Backup::Encryptor::GPG.initialize
- Defined in:
- lib/backup/encryptor/gpg.rb
.initialize(&block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new instance of Backup::Encryptor::GPG.
This constructor is not used directly when configuring Backup. Use Model#encrypt_with.
Model.new(:backup_trigger, 'Backup Label') do
archive :my_archive do |archive|
archive.add '/some/directory'
end
compress_with Gzip
encrypt_with GPG do |encryptor|
encryptor.mode = :both
encryptor.passphrase = 'a secret'
encryptor.recipients = ['[email protected]', '[email protected]']
end
store_with SFTP
notify_by Mail
end
391 392 393 394 395 396 397 |
# File 'lib/backup/encryptor/gpg.rb', line 391 def initialize(&block) super instance_eval(&block) if block_given? @mode ||= :asymmetric end |