Class: Procrastinator::TaskStore::SimpleCommaStore::CSVFileTransaction
- Inherits:
-
FileTransaction
- Object
- FileTransaction
- Procrastinator::TaskStore::SimpleCommaStore::CSVFileTransaction
- Defined in:
- lib/procrastinator/task_store/simple_comma_store.rb
Overview
Adds CSV parsing to the file reading
Instance Method Summary collapse
-
#transact(writable: nil) ⇒ Object
Completes the given block as an atomic transaction locked using a global mutex table.
Methods inherited from FileTransaction
Constructor Details
This class inherits a constructor from Procrastinator::FileTransaction
Instance Method Details
#transact(writable: nil) ⇒ Object
Completes the given block as an atomic transaction locked using a global mutex table. The block is provided the current file contents. The block’s result is written to the file.
144 145 146 147 148 |
# File 'lib/procrastinator/task_store/simple_comma_store.rb', line 144 def transact(writable: nil) super do |file_str| yield(parse(file_str)) end end |