# File lib/transaction/simple.rb, line 309
  def transaction(action = nil, name = nil)
    _method = case action
              when :start then :start_transaction
              when :rewind then :rewind_transaction
              when :abort then :abort_transaction
              when :commit then :commit_transaction
              when :name then :transaction_name
              when nil then :transaction_open?
              else nil
              end

    if method
      warn "The #transaction method has been deprecated. Use #{method} instead."
    else
      warn "The #transaction method has been deprecated."
    end

    case method
    when :transaction_name
      __send__ method
    when nil
      nil
    else
      __send__ method, name
    end
  end