Class: Yobi::Snapshot

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/yobi/snapshot.rb,
sig/yobi.rbs

Overview

One snapshot, as Restic reports it. Shared across Repository#snapshots, Repository#ls, and Repository#forget's keep/remove entries.

Instance Method Summary collapse

Instance Method Details

#hostString

Returns:

  • (String)


26
27
28
# File 'lib/yobi/snapshot.rb', line 26

def host
  self["hostname"]
end

#idString

Returns:

  • (String)


11
12
13
# File 'lib/yobi/snapshot.rb', line 11

def id
  self["id"]
end

#parent_idString?

Returns:

  • (String, nil)


41
42
43
# File 'lib/yobi/snapshot.rb', line 41

def parent_id
  self["parent"]
end

#pathsArray<String>

Returns:

  • (Array<String>)


36
37
38
# File 'lib/yobi/snapshot.rb', line 36

def paths
  self["paths"]
end

#short_idString

Returns:

  • (String)


16
17
18
# File 'lib/yobi/snapshot.rb', line 16

def short_id
  self["short_id"]
end

#tagsArray<String>

Returns:

  • (Array<String>)


31
32
33
# File 'lib/yobi/snapshot.rb', line 31

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

#timeTime

Returns:

  • (Time)


21
22
23
# File 'lib/yobi/snapshot.rb', line 21

def time
  @time ||= Time.parse(self["time"])
end