Commit 0af7e56
Changed files (1)
lib
del
lib/del/repository.rb
@@ -13,6 +13,10 @@ module Del
@lock.synchronize { @storage[id.to_s] }
end
+ def find_by_value
+ @lock.synchronize { @storage.values.find { |x| yield x } }
+ end
+
def find_all
@lock.synchronize { @storage.keys }
end