lib/ruote/storage/hash_storage.rb in ruote-2.1.6 vs lib/ruote/storage/hash_storage.rb in ruote-2.1.7
- old
+ new
@@ -28,26 +28,31 @@
require 'monitor'
module Ruote
+ # An in-memory storage.
+ #
class HashStorage
include StorageBase
include MonitorMixin
attr_reader :h
def initialize (options={})
super()
+ # since were including MonitorMixin, this super() is necessary
- @options = options
-
purge!
+
+ put(options.merge('type' => 'configurations', '_id' => 'engine'))
end
def put (doc, opts={})
+
+ i = @h.size
synchronize do
pre = get(doc['type'], doc['_id'])