Class: Yobi::RestoreOutcome
- Inherits:
-
Object
- Object
- Yobi::RestoreOutcome
- Defined in:
- lib/yobi/repository/restore.rb,
sig/yobi.rbs
Overview
The outcome of one Yobi::Repository#restore call.
Instance Attribute Summary collapse
-
#output ⇒ ResticOutput
readonly
The Yobi::ResticOutput backing this outcome.
Instance Method Summary collapse
-
#initialize(execution) ⇒ RestoreOutcome
constructor
:nodoc:.
- #pretty_print(q) ⇒ Object
-
#summary ⇒ Hash[String, untyped]
(also: #report)
Restic's own
"summary"fields (+"total_files"+,"files_restored", ...).
Constructor Details
#initialize(execution) ⇒ RestoreOutcome
:nodoc:
81 82 83 |
# File 'lib/yobi/repository/restore.rb', line 81 def initialize(execution) # :nodoc: @output = execution[:output] end |
Instance Attribute Details
#output ⇒ ResticOutput (readonly)
The Yobi::ResticOutput backing this outcome.
79 80 81 |
# File 'lib/yobi/repository/restore.rb', line 79 def output @output end |
Instance Method Details
#pretty_print(q) ⇒ Object
91 92 93 94 95 96 |
# File 'lib/yobi/repository/restore.rb', line 91 def pretty_print(q) q.object_group(self) do q.breakable q.pp summary end end |
#summary ⇒ Hash[String, untyped] Also known as: report
Restic's own "summary" fields (+"total_files"+, "files_restored", ...).
86 87 88 |
# File 'lib/yobi/repository/restore.rb', line 86 def summary @summary ||= output.("summary").first || {} end |