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)


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

def host
  self["host"]
end

#keepArray<Yobi::Snapshot>

Returns:



95
96
97
# File 'lib/yobi/repository/forget.rb', line 95

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

#pathsArray<String>

Returns:

  • (Array<String>)


90
91
92
# File 'lib/yobi/repository/forget.rb', line 90

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



105
106
107
# File 'lib/yobi/repository/forget.rb', line 105

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

#removeArray<Yobi::Snapshot>

Returns:



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

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

#tagsArray<String>

Returns:

  • (Array<String>)


85
86
87
# File 'lib/yobi/repository/forget.rb', line 85

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