Methods
C
F
N
R
S
Constants
VALID_STATES = Set.new([:committed, :rolledback, nil])
 
Class Public methods
new(state = nil)
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 6
def initialize(state = nil)
  @state = state
end
Instance Public methods
committed?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 14
def committed?
  @state == :committed
end
completed?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 22
def completed?
  committed? || rolledback?
end
finalized?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 10
def finalized?
  @state
end
rolledback?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 18
def rolledback?
  @state == :rolledback
end
set_state(state)
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 26
def set_state(state)
  unless VALID_STATES.include?(state)
    raise ArgumentError, "Invalid transaction state: #{state}"
  end
  @state = state
end