class Umwelt::History::Follow
Public Class Methods
new( reader: Umwelt::Episode::File::Restore, path: '.umwelt' )
click to toggle source
# File lib/umwelt/history/follow.rb, line 7 def initialize( reader: Umwelt::Episode::File::Restore, path: '.umwelt' ) @reader = reader.new(path: path) end
Public Instance Methods
call(phases)
click to toggle source
# File lib/umwelt/history/follow.rb, line 14 def call(phases) @episodes = phases.map { |phase| episode(phase) } end
Private Instance Methods
episode(phase)
click to toggle source
# File lib/umwelt/history/follow.rb, line 20 def episode(phase) restored = restore_episode(phase.id) error! restored.errors if restored.failure? restored.struct end
restore_episode(phase_id)
click to toggle source
# File lib/umwelt/history/follow.rb, line 26 def restore_episode(phase_id) @reader.call(phase_id) end