Class: Rematch
- Inherits:
-
Object
- Object
- Rematch
- Defined in:
- lib/rematch.rb,
lib/rematch/tasks.rb
Overview
Implement the key/value store
Defined Under Namespace
Modules: Tasks
Constant Summary collapse
- VERSION =
'0.0.1'- EXT =
'.rematch'
Instance Method Summary collapse
-
#initialize(path:, id:) ⇒ Rematch
constructor
path and unique id of the test being run.
-
#rematch(value) ⇒ Object
store if unknown; retrieve otherwise.
Constructor Details
Instance Method Details
#rematch(value) ⇒ Object
store if unknown; retrieve otherwise
19 20 21 22 |
# File 'lib/rematch.rb', line 19 def rematch(value) key = "[#{@count += 1}] #{@id}" @store.transaction { |s| s.root?(key) ? s[key] : s[key] = value } end |