Sha256: 8a3e6a511a258f696aaf60885a2dc8cbae357edd366d9e1bc23f40d3b5392711
Contents?: true
Size: 835 Bytes
Versions: 17
Compression:
Stored size: 835 Bytes
Contents
require 'pupa/processor/document_store/file_store' require 'pupa/processor/document_store/redis_store' module Pupa class Processor # An JSON document store factory. # # Heavily inspired by `ActiveSupport::Cache::Store`. class DocumentStore # Returns a configured JSON document store. # # See each document store for more information. # # @param [String] argument the filesystem directory or Redis address # (e.g. `redis://localhost:6379/0`) in which to dump JSON documents # @param [Hash] options optional arguments # @return a configured JSON document store def self.new(argument, **options) if argument[%r{\Aredis://}] RedisStore.new(argument, options) else FileStore.new(argument) end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems