lib/asynchronic/data_store/scoped_store.rb in asynchronic-1.4.0 vs lib/asynchronic/data_store/scoped_store.rb in asynchronic-1.5.0

- old
+ new

@@ -7,11 +7,11 @@ attr_reader :data_store attr_reader :scope def initialize(data_store, scope) @data_store = data_store - @scope = Key.new scope + @scope = Key[scope] end def [](key) @data_store[@scope[key]] end @@ -22,13 +22,17 @@ def delete(key) @data_store.delete @scope[key] end + def delete_cascade + @data_store.delete_cascade @scope + end + def keys @data_store.keys. select { |k| k.start_with? @scope[''] }. - map { |k| Key.new(k).remove_first @scope.sections.count } + map { |k| Key[k].remove_first @scope.sections.count } end def synchronize(key, &block) data_store.synchronize(key, &block) end \ No newline at end of file