Module: DataMapper::Adapters
- Defined in:
- lib/dm-transactions.rb
Overview
class Transaction
Class Method Summary collapse
Class Method Details
.include_transaction_api(const_name) ⇒ Object
404 405 406 407 408 409 410 411 412 413 |
# File 'lib/dm-transactions.rb', line 404 def self.include_transaction_api(const_name) require transaction_extensions(const_name) if Transaction.const_defined?(const_name) adapter = const_get(const_name) adapter.send(:include, transaction_module(const_name)) end rescue LoadError # Silently ignore the fact that no adapter extensions could be required # This means that the adapter in use doesn't support transactions end |
.transaction_module(const_name) ⇒ Object
415 416 417 |
# File 'lib/dm-transactions.rb', line 415 def self.transaction_module(const_name) Transaction.const_get(const_name) end |