Module: Yobi::RestoreMessageWrapper
- Defined in:
- lib/yobi/repository/restore.rb,
sig/yobi.rbs
Overview
Classifies a raw restore message Hash by its own message_type, wrapping
it in the matching typed class. Used both by Yobi::Repository#restore
(as the ResticOutput transform: for a live streaming run) and
by RestoreOutcome's own post-hoc accessors.
Class Method Summary collapse
-
.call(raw) ⇒ Yobi::RestoreStatus, ...
The raw Hash itself for a message_type this version of Yobi doesn't recognize.
Class Method Details
.call(raw) ⇒ Yobi::RestoreStatus, ...
Returns the raw Hash itself for a message_type this version of Yobi doesn't recognize.
80 81 82 83 84 85 86 |
# File 'lib/yobi/repository/restore.rb', line 80 def self.call(raw) case raw["message_type"] when "status" then RestoreStatus.new(raw) when "verbose_status" then RestoreVerboseStatus.new(raw) else raw end end |