# File lib/expire/keep_adjective_for_rule_base.rb, line 14 def self.primary_rank PRIMARY_RANK end
class Expire::KeepAdjectiveForRuleBase
Hold backups for a period
Constants
- ADJECTIVE_FOR
- PRIMARY_RANK
Public Class Methods
primary_rank()
click to toggle source
rank()
click to toggle source
# File lib/expire/keep_adjective_for_rule_base.rb, line 18 def self.rank primary_rank + secondary_rank end
Public Instance Methods
apply(backups, _)
click to toggle source
Calls superclass method
Expire::FromNowKeepAdjectiveForRuleBase#apply
# File lib/expire/keep_adjective_for_rule_base.rb, line 22 def apply(backups, _) super(backups, backups.newest) end
primary_rank()
click to toggle source
# File lib/expire/keep_adjective_for_rule_base.rb, line 26 def primary_rank self.class.primary_rank end
reason_to_keep()
click to toggle source
# File lib/expire/keep_adjective_for_rule_base.rb, line 30 def reason_to_keep "keep #{amount} #{ADJECTIVE_FOR[spacing]} #{numerus_backup}" end