Sha256: 775426d94129086987771819046f687c6ebcc5c830b43b990078067e87b38884

Contents?: true

Size: 650 Bytes

Versions: 16

Compression:

Stored size: 650 Bytes

Contents

# frozen_string_literal: true

module Kiev
  module RequestStore
    def self.store
      ::RequestStore.store[:kiev] ||= {}
    end

    module Mixin
      def wrap_request_store_13
        ::RequestStore.begin!
        yield
      ensure
        ::RequestStore.end!
        ::RequestStore.clear!
      end

      def wrap_request_store_10
        ::RequestStore.clear!
        yield
      ensure
        ::RequestStore.clear!
      end

      if ::RequestStore::VERSION >= "1.3"
        alias_method :wrap_request_store, :wrap_request_store_13
      else
        alias_method :wrap_request_store, :wrap_request_store_10
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
kiev-4.9.0 lib/kiev/request_store.rb
kiev-4.8.3 lib/kiev/request_store.rb
kiev-4.8.2 lib/kiev/request_store.rb
kiev-4.8.1 lib/kiev/request_store.rb
kiev-4.8.0 lib/kiev/request_store.rb
kiev-4.7.0 lib/kiev/request_store.rb
kiev-4.6.0 lib/kiev/request_store.rb
kiev-4.5.0 lib/kiev/request_store.rb
kiev-4.4.0 lib/kiev/request_store.rb
kiev-4.3.0 lib/kiev/request_store.rb
kiev-4.2.0 lib/kiev/request_store.rb
kiev-4.1.0 lib/kiev/request_store.rb
kiev-4.0.0 lib/kiev/request_store.rb
kiev-3.0.0 lib/kiev/request_store.rb
kiev-2.8.0 lib/kiev/request_store.rb
kiev-2.7.3 lib/kiev/request_store.rb