Class: Yobi::TagOutcome
- Inherits:
-
Object
- Object
- Yobi::TagOutcome
- Defined in:
- lib/yobi/repository/tag.rb,
sig/yobi.rbs
Overview
The outcome of one Yobi::Repository#tag call.
Instance Attribute Summary collapse
-
#output ⇒ ResticOutput
readonly
The Yobi::ResticOutput backing this outcome.
Instance Method Summary collapse
-
#changes ⇒ ResticOutput::LazyList[TagChange]
One Yobi::TagChange per snapshot actually modified.
-
#initialize(execution) ⇒ TagOutcome
constructor
:nodoc:.
- #pretty_print(q) ⇒ Object
-
#summary ⇒ TagSummary
(also: #report)
The Yobi::TagSummary of Restic's own
"summary"fields.
Constructor Details
#initialize(execution) ⇒ TagOutcome
:nodoc:
51 52 53 |
# File 'lib/yobi/repository/tag.rb', line 51 def initialize(execution) # :nodoc: @output = execution[:output] end |
Instance Attribute Details
#output ⇒ ResticOutput (readonly)
The Yobi::ResticOutput backing this outcome.
49 50 51 |
# File 'lib/yobi/repository/tag.rb', line 49 def output @output end |
Instance Method Details
#changes ⇒ ResticOutput::LazyList[TagChange]
One Yobi::TagChange per snapshot actually modified.
62 63 64 |
# File 'lib/yobi/repository/tag.rb', line 62 def changes @changes ||= output.("changed") end |
#pretty_print(q) ⇒ Object
66 67 68 69 70 71 |
# File 'lib/yobi/repository/tag.rb', line 66 def pretty_print(q) q.object_group(self) do q.breakable q.pp summary end end |
#summary ⇒ TagSummary Also known as: report
The Yobi::TagSummary of Restic's own "summary" fields.
56 57 58 |
# File 'lib/yobi/repository/tag.rb', line 56 def summary @summary ||= output.("summary").first || TagSummary.new({}) end |