module DataMapper::Transaction::Model
Public Class Methods
included(mod)
click to toggle source
@api private
# File lib/dm-transactions.rb, line 360 def self.included(mod) mod.descendants.each { |model| model.extend self } end
Public Instance Methods
transaction() { |*block_args| ... }
click to toggle source
Produce a new Transaction for this Resource class
@return <Adapters::Transaction
a new Adapters::Transaction with all Repositories of the class of this Resource added.
@api public
# File lib/dm-transactions.rb, line 371 def transaction transaction = Transaction.new(self) transaction.commit { |block_args| yield(*block_args) } end