Class: Crashbreak::StateRestorer
- Inherits:
-
Object
- Object
- Crashbreak::StateRestorer
- Defined in:
- lib/crashbreak/restorers/state_restorer.rb
Instance Method Summary collapse
-
#initialize(error_id) ⇒ StateRestorer
constructor
A new instance of StateRestorer.
- #restore ⇒ Object
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
#restore ⇒ Object
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 |