abstract class Lockable
- Lockable
- Reference
- Object
Overview
Lockable is an abstract class that provides a function #transaction!
that
allows the class to execute some code that requires to do not conflict with
other operations. It is usually linked with an IO (a file).
Direct Known Subclasses
Defined in:
lib/lockable.crInstance Method Summary
- #load!
- #save!
-
#transaction!(read = false, &)
Execute some operation on the object, and then save it.
Instance Method Detail
def transaction!(read = false, &)
#
Execute some operation on the object, and then save it. The content can be loaded before executing the operations optionnaly.
someLockableObject.transaction(read: true) { |obj| obj.update_operation(...) }