Class: Yobi::DiffOutcome
- Inherits:
-
Object
- Object
- Yobi::DiffOutcome
- Defined in:
- lib/yobi/repository/diff.rb,
sig/yobi.rbs
Overview
The outcome of one Yobi::Repository#diff call.
Instance Attribute Summary collapse
-
#output ⇒ ResticOutput
readonly
The Yobi::ResticOutput backing this outcome.
Instance Method Summary collapse
-
#changes ⇒ ResticOutput::LazyList[DiffChange]
Every Yobi::DiffChange from the run.
-
#initialize(execution) ⇒ DiffOutcome
constructor
:nodoc:.
- #pretty_print(q) ⇒ Object
-
#statistics ⇒ DiffStatistics
(also: #report)
The Yobi::DiffStatistics of Restic's own
"statistics"fields.
Constructor Details
#initialize(execution) ⇒ DiffOutcome
:nodoc:
33 34 35 |
# File 'lib/yobi/repository/diff.rb', line 33 def initialize(execution) # :nodoc: @output = execution[:output] end |
Instance Attribute Details
#output ⇒ ResticOutput (readonly)
The Yobi::ResticOutput backing this outcome.
31 32 33 |
# File 'lib/yobi/repository/diff.rb', line 31 def output @output end |
Instance Method Details
#changes ⇒ ResticOutput::LazyList[DiffChange]
Every Yobi::DiffChange from the run.
44 45 46 |
# File 'lib/yobi/repository/diff.rb', line 44 def changes @changes ||= output.("change") end |
#pretty_print(q) ⇒ Object
48 49 50 51 52 53 |
# File 'lib/yobi/repository/diff.rb', line 48 def pretty_print(q) q.object_group(self) do q.breakable q.pp statistics end end |
#statistics ⇒ DiffStatistics Also known as: report
The Yobi::DiffStatistics of Restic's own "statistics" fields.
38 39 40 |
# File 'lib/yobi/repository/diff.rb', line 38 def statistics @statistics ||= output.("statistics").first || DiffStatistics.new({}) end |