Sha256: c98c19eb2dbdb78026abe447b945f8833dccdde4de8e0f3e14a19f45279a3bb5

Contents?: true

Size: 944 Bytes

Versions: 1

Compression:

Stored size: 944 Bytes

Contents

# Copyright (C) 2019-2020 MongoDB Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module Mongo
  module Transactions
    Context = Struct.new(
      :session0,
      :session1,
      :session,
    ) do
      def transform_arguments(arguments)
        arguments.dup.tap do |out|
          [:session].each do |key|
            if out[key]
              out[key] = send(key)
            end
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongo-2.13.0.beta1 spec/runners/transactions/context.rb