Class: DailyWeeklyMonthly::Runner
- Inherits:
-
Object
- Object
- DailyWeeklyMonthly::Runner
- Defined in:
- lib/daily_weekly_monthly/runner.rb
Constant Summary collapse
- DEFAULTS =
{ backups_dir: File.("~/backups"), output_extension: "pgdump.gz", day_of_week: 1, day_of_month: 1, days_to_keep: 7, weeks_to_keep: 5, months_to_keep: 12, smtp_server: false, smtp_port: false, notify: false, }.freeze
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(backup_command, options = {}) ⇒ Runner
constructor
A new instance of Runner.
Constructor Details
Instance Method Details
#call ⇒ Object
25 26 27 28 29 30 |
# File 'lib/daily_weekly_monthly/runner.rb', line 25 def call processor = Processor.new(backup, @options[:backups_dir], @options[:output_extension]) processor.call("daily", keep: @options[:days_to_keep]) processor.call("weekly", keep: @options[:weeks_to_keep]) if weekly_backup? processor.call("monthly", keep: @options[:months_to_keep]) if monthly_backup? end |