Sha256: 82a453f765f7c74431c15534232d1293b07a53d3678743440aace1f38d18ed63

Contents?: true

Size: 469 Bytes

Versions: 7

Compression:

Stored size: 469 Bytes

Contents

# frozen_string_literal: true

module OperatorRecordable
  module Store
    def self.register(name, klass)
      @stores ||= {}
      @stores[name] = klass
    end

    def self.fetch(name)
      @stores.fetch(name)
    end
  end
end

require "operator_recordable/store/thread_store"
require "operator_recordable/store/request_store" if defined? ::RequestStore
require "operator_recordable/store/current_attributes_store" if defined? ::ActiveSupport::CurrentAttributes

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
operator_recordable-1.2.0 lib/operator_recordable/store.rb
operator_recordable-1.1.0 lib/operator_recordable/store.rb
operator_recordable-1.0.0 lib/operator_recordable/store.rb
operator_recordable-0.4.0 lib/operator_recordable/store.rb
operator_recordable-0.3.0 lib/operator_recordable/store.rb
operator_recordable-0.2.0 lib/operator_recordable/store.rb
operator_recordable-0.1.1 lib/operator_recordable/store.rb