Method: Kimurai::Base::Storage#unique?
- Defined in:
- lib/kimurai/base/storage.rb
#unique?(scope, value) ⇒ Boolean
38 39 40 41 42 43 |
# File 'lib/kimurai/base/storage.rb', line 38 def unique?(scope, value) @mutex.synchronize do database[scope] ||= [] database[scope].include?(value) ? false : database[scope].push(value) and true end end |