Class: Bard::Backup::Deleter::Filter
- Inherits:
-
Struct
- Object
- Struct
- Bard::Backup::Deleter::Filter
- Defined in:
- lib/bard/backup/deleter.rb
Instance Attribute Summary collapse
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#now ⇒ Object
Returns the value of attribute now.
-
#unit ⇒ Object
Returns the value of attribute unit.
Instance Method Summary collapse
Instance Attribute Details
#limit ⇒ Object
Returns the value of attribute limit
24 25 26 |
# File 'lib/bard/backup/deleter.rb', line 24 def limit @limit end |
#now ⇒ Object
Returns the value of attribute now
24 25 26 |
# File 'lib/bard/backup/deleter.rb', line 24 def now @now end |
#unit ⇒ Object
Returns the value of attribute unit
24 25 26 |
# File 'lib/bard/backup/deleter.rb', line 24 def unit @unit end |
Instance Method Details
#cover?(file) ⇒ Boolean
25 26 27 28 29 30 |
# File 'lib/bard/backup/deleter.rb', line 25 def cover? file remote = DateTime.parse(file).beginning_of_hour limit.times.any? do |count| remote == ago(count) end end |