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)


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

def host
  self["host"]
end

#keepArray<Yobi::Snapshot>

Returns:



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

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

#pathsArray<String>

Returns:

  • (Array<String>)


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

def paths
  self["paths"]
end

#reasonsArray<Yobi::KeepReason>

Returns one per kept snapshot, explaining which policy rule(s) kept it.

Returns:

  • (Array<Yobi::KeepReason>)

    one per kept snapshot, explaining which policy rule(s) kept it



103
104
105
# File 'lib/yobi/repository/forget.rb', line 103

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

#removeArray<Yobi::Snapshot>

Returns:



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

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

#tagsArray<String>

Returns:

  • (Array<String>)


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

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