Sha256: dd219e17da8f76c88b701e299d2a51e364991afffc36fb73411a9a94f93cd2d5

Contents?: true

Size: 316 Bytes

Versions: 3

Compression:

Stored size: 316 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(modis_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.3.2 lib/modis/transaction.rb
modis-4.3.1 lib/modis/transaction.rb
modis-4.3.0 lib/modis/transaction.rb