Sha256: 4658ca47628455c88a724299279746d78ea63f85718e7fb78f567c011c3abf4d

Contents?: true

Size: 298 Bytes

Versions: 3

Compression:

Stored size: 298 Bytes

Contents

# frozen_string_literal: true

module Modis
  module Transaction
    def self.included(base)
      base.extend ClassMethods
    end

    module ClassMethods
      def transaction
        Modis.with_connection { |redis| redis.multi { |transaction| yield(transaction) } }
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
modis-4.2.0 lib/modis/transaction.rb
modis-4.1.0 lib/modis/transaction.rb
modis-4.0.1 lib/modis/transaction.rb