Class: PlaywrightOnRails::ResetsState
- Inherits:
-
Object
- Object
- PlaywrightOnRails::ResetsState
- Defined in:
- lib/playwright-on-rails/resets_state.rb
Instance Method Summary collapse
- #call(transactional_server:) ⇒ Object
-
#initialize ⇒ ResetsState
constructor
A new instance of ResetsState.
Constructor Details
#initialize ⇒ ResetsState
Returns a new instance of ResetsState.
7 8 9 10 |
# File 'lib/playwright-on-rails/resets_state.rb', line 7 def initialize @manages_transactions = ManagesTransactions.instance @initializer_hooks = InitializerHooks.instance end |
Instance Method Details
#call(transactional_server:) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/playwright-on-rails/resets_state.rb', line 12 def call(transactional_server:) if transactional_server @manages_transactions.rollback_transaction @manages_transactions.begin_transaction end @initializer_hooks.run(:after_state_reset) end |