Class: Pupa::Processor::DocumentStore
- Inherits:
-
Object
- Object
- Pupa::Processor::DocumentStore
- Defined in:
- lib/pupa/processor/document_store.rb,
lib/pupa/processor/document_store/file_store.rb,
lib/pupa/processor/document_store/redis_store.rb
Overview
An JSON document store factory.
Heavily inspired by ActiveSupport::Cache::Store
.
Defined Under Namespace
Classes: FileStore, RedisStore
Class Method Summary collapse
-
.new(argument, **options) ⇒ Object
Returns a configured JSON document store.
Class Method Details
.new(argument, **options) ⇒ Object
Returns a configured JSON document store.
See each document store for more information.
18 19 20 21 22 23 24 |
# File 'lib/pupa/processor/document_store.rb', line 18 def self.new(argument, **) if argument[%r{\Aredis://}] RedisStore.new(argument, ) else FileStore.new(argument) end end |