Method: Fable::Story#restore_state_snapshot!

Defined in:
lib/fable/story.rb

#restore_state_snapshot!Object



184
185
186
187
188
189
190
191
192
193
194
# File 'lib/fable/story.rb', line 184

def restore_state_snapshot!
  # Patched state had temporarily hijacked our variables_state and
  # set its own callstack on it, so we need to restore that
  # If we're in the middle of saving, we may also need to give the
  # variables_state the old patch

  @state_snapshot_at_last_newline.restore_after_patch!
  self.state = @state_snapshot_at_last_newline
  @state_snapshot_at_last_newline = nil
  self.state.apply_any_patch!
end