# File lib/transaction/simple.rb, line 347
  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