Class: Yobi::Snapshot
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Yobi::Snapshot
- 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
- #host ⇒ String
- #id ⇒ String
- #parent_id ⇒ String?
- #paths ⇒ Array<String>
- #short_id ⇒ String
- #tags ⇒ Array<String>
- #time ⇒ Time
Instance Method Details
#host ⇒ String
26 27 28 |
# File 'lib/yobi/snapshot.rb', line 26 def host self["hostname"] end |
#id ⇒ String
11 12 13 |
# File 'lib/yobi/snapshot.rb', line 11 def id self["id"] end |
#parent_id ⇒ String?
41 42 43 |
# File 'lib/yobi/snapshot.rb', line 41 def parent_id self["parent"] end |
#paths ⇒ Array<String>
36 37 38 |
# File 'lib/yobi/snapshot.rb', line 36 def paths self["paths"] end |
#short_id ⇒ String
16 17 18 |
# File 'lib/yobi/snapshot.rb', line 16 def short_id self["short_id"] end |
#tags ⇒ Array<String>
31 32 33 |
# File 'lib/yobi/snapshot.rb', line 31 def @tags ||= self["tags"] || [] end |
#time ⇒ Time
21 22 23 |
# File 'lib/yobi/snapshot.rb', line 21 def time @time ||= Time.parse(self["time"]) end |