Class: Yobi::ForgetGroup
- Defined in:
- lib/yobi/repository/forget.rb,
sig/yobi.rbs
Overview
One grouping Restic's forget policy was evaluated against (by default, grouped by host+paths).
Instance Method Summary collapse
- #host ⇒ String
-
#keep ⇒ Array[Snapshot]
Yobi::Snapshot instances kept by the policy.
- #paths ⇒ Array[String]
-
#reasons ⇒ Array[KeepReason]
One Yobi::KeepReason per kept snapshot, explaining which policy rule(s) kept it.
-
#remove ⇒ Array[Snapshot]
Yobi::Snapshot instances removed by the policy.
- #tags ⇒ Array[String]
Methods inherited from FancyHash
#initialize, #inspect, #pretty_print
Constructor Details
This class inherits a constructor from Yobi::FancyHash
Instance Method Details
#host ⇒ String
75 76 77 |
# File 'lib/yobi/repository/forget.rb', line 75 def host self["host"] end |
#keep ⇒ Array[Snapshot]
Yobi::Snapshot instances kept by the policy.
88 89 90 |
# File 'lib/yobi/repository/forget.rb', line 88 def keep @keep ||= (self["keep"] || []).map { |entry| Yobi::Snapshot.new(entry) } end |
#paths ⇒ Array[String]
83 84 85 |
# File 'lib/yobi/repository/forget.rb', line 83 def paths self["paths"] end |
#reasons ⇒ Array[KeepReason]
One Yobi::KeepReason per kept snapshot, explaining which policy rule(s) kept it.
99 100 101 |
# File 'lib/yobi/repository/forget.rb', line 99 def reasons @reasons ||= (self["reasons"] || []).map { |entry| Yobi::KeepReason.new(entry) } end |
#remove ⇒ Array[Snapshot]
Yobi::Snapshot instances removed by the policy.
93 94 95 |
# File 'lib/yobi/repository/forget.rb', line 93 def remove @remove ||= (self["remove"] || []).map { |entry| Yobi::Snapshot.new(entry) } end |
#tags ⇒ Array[String]
79 80 81 |
# File 'lib/yobi/repository/forget.rb', line 79 def @tags ||= self["tags"] || [] end |