class Expire::KeepMostRecentForRule

Keep the most recent backups for a certain period of time.

Constants

RULE_RANK

Attributes

unit[R]

Public Class Methods

rank() click to toggle source
# File lib/expire/keep_most_recent_for_rule.rb, line 14
def self.rank
  RULE_RANK
end

Public Instance Methods

apply(backups, _) click to toggle source
# File lib/expire/keep_most_recent_for_rule.rb, line 18
def apply(backups, _)
  reference_datetime = backups.newest
  super(backups, reference_datetime)
end
rank() click to toggle source
# File lib/expire/keep_most_recent_for_rule.rb, line 23
def rank
  self.class.rank
end
reason_to_keep() click to toggle source
# File lib/expire/keep_most_recent_for_rule.rb, line 27
def reason_to_keep
  "keep most recent backups for #{amount} #{numerus_unit}"
end