Class: Crashbreak::StateRestorer

Inherits:
Object
  • Object
show all
Defined in:
lib/crashbreak/restorers/state_restorer.rb

Instance Method Summary collapse

Constructor Details

#initialize(error_id) ⇒ StateRestorer

Returns a new instance of StateRestorer.



3
4
5
# File 'lib/crashbreak/restorers/state_restorer.rb', line 3

def initialize(error_id)
  @error_id = error_id
end

Instance Method Details

#restoreObject



7
8
9
10
11
12
13
# File 'lib/crashbreak/restorers/state_restorer.rb', line 7

def restore
  {}.tap do |restorers_hash|
    restorers.each do |restorer|
      restorers_hash[key_name(restorer)] = restorer.new(dumper_data(restorer)).restore
    end
  end
end