lib/key_vortex/adapter/memory.rb in key-vortex-0.1.2 vs lib/key_vortex/adapter/memory.rb in key-vortex-0.1.3

- old
+ new

@@ -1,12 +1,15 @@ # frozen_string_literal: true +require "key_vortex/adapter" + class KeyVortex class Adapter class Memory < KeyVortex::Adapter - def initialize(items) + def initialize(items, limitations: []) super() @items = items + limitations.each { |limit| register_limitation(limit) } end def save(record) @items[record.id] = record end