Class: ActiveSanction::ValidatorStore::Memory
- Inherits:
-
ValidatorStore
- Object
- ValidatorStore
- ActiveSanction::ValidatorStore::Memory
- Extended by:
- T::Sig
- Defined in:
- lib/active_sanction/validator_store/memory.rb
Overview
Validators for the life of one process, and no longer.
The default for a caller that builds its own client and does not want a file appearing under a home directory, and what the suite uses so an example never depends on -- or leaves behind -- state on disk. A long-running process that syncs on a schedule still gets the whole benefit of conditional GET from it; only a fresh boot pays for a full download.
Instance Method Summary collapse
- #initialize(entries = {}) ⇒ void constructor
Constructor Details
#initialize(entries = {}) ⇒ void
20 21 22 23 24 25 |
# File 'lib/active_sanction/validator_store/memory.rb', line 20 def initialize(entries = {}) @entries = T.let({}, T::Hash[String, Validators]) @mutex = T.let(Mutex.new, Mutex) entries.each { |key, validators| self[key] = validators } super() end |