Module: Backup::Configuration::Helpers
- Defined in:
- lib/backup/configuration/helpers.rb
Instance Method Summary collapse
-
#backup(trigger, &block) ⇒ Object
A helper method for the config/backup.rb configuration file Expects a trigger in argument one (STRING) Expects a block of settings.
-
#notifier_settings(&block) ⇒ Object
A helper method for the config/mail.rb configuration file Takes a block containing the mail options.
Instance Method Details
#backup(trigger, &block) ⇒ Object
A helper method for the config/backup.rb configuration file Expects a trigger in argument one (STRING) Expects a block of settings
8 9 10 11 12 13 |
# File 'lib/backup/configuration/helpers.rb', line 8 def backup(trigger, &block) backup = Backup::Configuration::Base.new(trigger) backup.instance_eval &block @backup_procedures ||= Array.new @backup_procedures << backup end |
#notifier_settings(&block) ⇒ Object
A helper method for the config/mail.rb configuration file Takes a block containing the mail options
17 18 19 20 |
# File 'lib/backup/configuration/helpers.rb', line 17 def notifier_settings(&block) @mail_configuration = Backup::Configuration::Mail.new @mail_configuration.instance_eval &block end |