Class: ActiveRecord::ConnectionAdapters::Transaction

Inherits:
Object
  • Object
show all
Defined in:
activerecord/lib/active_record/connection_adapters/abstract/transaction.rb

Overview

:nodoc:

Direct Known Subclasses

ClosedTransaction, OpenTransaction

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Transaction

Returns a new instance of Transaction.



6
7
8
9
# File 'activerecord/lib/active_record/connection_adapters/abstract/transaction.rb', line 6

def initialize(connection)
  @connection = connection
  @state = TransactionState.new
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection



4
5
6
# File 'activerecord/lib/active_record/connection_adapters/abstract/transaction.rb', line 4

def connection
  @connection
end

Instance Method Details

#stateObject



11
12
13
# File 'activerecord/lib/active_record/connection_adapters/abstract/transaction.rb', line 11

def state
  @state
end