Class: Yobi::ForgetGroup

Inherits:
FancyHash show all
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

Methods inherited from FancyHash

#initialize, #inspect, #pretty_print

Constructor Details

This class inherits a constructor from Yobi::FancyHash

Instance Method Details

#hostString

Returns:

  • (String)


75
76
77
# File 'lib/yobi/repository/forget.rb', line 75

def host
  self["host"]
end

#keepArray[Snapshot]

Yobi::Snapshot instances kept by the policy.

Returns:



88
89
90
# File 'lib/yobi/repository/forget.rb', line 88

def keep
  @keep ||= (self["keep"] || []).map { |entry| Yobi::Snapshot.new(entry) }
end

#pathsArray[String]

Returns:

  • (Array[String])


83
84
85
# File 'lib/yobi/repository/forget.rb', line 83

def paths
  self["paths"]
end

#reasonsArray[KeepReason]

One Yobi::KeepReason per kept snapshot, explaining which policy rule(s) kept it.

Returns:



99
100
101
# File 'lib/yobi/repository/forget.rb', line 99

def reasons
  @reasons ||= (self["reasons"] || []).map { |entry| Yobi::KeepReason.new(entry) }
end

#removeArray[Snapshot]

Yobi::Snapshot instances removed by the policy.

Returns:



93
94
95
# File 'lib/yobi/repository/forget.rb', line 93

def remove
  @remove ||= (self["remove"] || []).map { |entry| Yobi::Snapshot.new(entry) }
end

#tagsArray[String]

Returns:

  • (Array[String])


79
80
81
# File 'lib/yobi/repository/forget.rb', line 79

def tags
  @tags ||= self["tags"] || []
end