Class: Crashbreak::SessionRestorer
- Inherits:
-
Object
- Object
- Crashbreak::SessionRestorer
- Defined in:
- lib/crashbreak/restorers/session_restorer.rb
Instance Method Summary collapse
-
#initialize(session_data) ⇒ SessionRestorer
constructor
A new instance of SessionRestorer.
- #restore ⇒ Object
Constructor Details
#initialize(session_data) ⇒ SessionRestorer
Returns a new instance of SessionRestorer.
3 4 5 |
# File 'lib/crashbreak/restorers/session_restorer.rb', line 3 def initialize(session_data) @session_data = session_data end |
Instance Method Details
#restore ⇒ Object
7 8 9 10 11 |
# File 'lib/crashbreak/restorers/session_restorer.rb', line 7 def restore @session_data.tap do |session_data| $session_data = session_data # pass it via global variable to restorers middleware end end |