Module: Quiver::Mappers::MemoryTransaction
- Defined in:
- lib/quiver/mappers.rb
Class Method Summary collapse
Class Method Details
.transaction(root_module, &block) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/quiver/mappers.rb', line 38 def self.transaction(root_module, &block) raise ArgumentError, "#transaction requires a block" unless block_given? transaction = Transaction.new root_module::Application.memory_adapter_store.transaction do ret = block.call(transaction) raise RollbackTransaction if transaction.rollback? ret end end |