edge badge
Methods
C
F
N
R
S
Constants
VALID_STATES = Set.new([:committed, :rolledback, nil])
 
Attributes
[R] parent
Class Public methods
new(state = nil)
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 8
def initialize(state = nil)
  @state = state
  @parent = nil
end
Instance Public methods
committed?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 17
def committed?
  @state == :committed
end
finalized?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 13
def finalized?
  @state
end
rolledback?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 21
def rolledback?
  @state == :rolledback
end
set_state(state)
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 25
def set_state(state)
  if !VALID_STATES.include?(state)
    raise ArgumentError, "Invalid transaction state: #{state}"
  end
  @state = state
end