Class: Serviced::Configuration
- Inherits:
-
Object
- Object
- Serviced::Configuration
- Defined in:
- lib/serviced/configuration.rb
Overview
Instance Attribute Summary collapse
-
#transaction_handler ⇒ #call?
A callable that runs the given block inside a database transaction.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
19 20 21 |
# File 'lib/serviced/configuration.rb', line 19 def initialize @transaction_handler = default_transaction_handler end |
Instance Attribute Details
#transaction_handler ⇒ #call?
A callable that runs the given block inside a database transaction. It must execute the block and roll back when the block raises (Serviced relies on this to undo a transactional flow whose step failed).
Defaults to ActiveRecord::Base.transaction when ActiveRecord is loaded,
otherwise nil.
17 18 19 |
# File 'lib/serviced/configuration.rb', line 17 def transaction_handler @transaction_handler end |