Ruby PStore Functions
EditRocket provides the following information on PStore functions in the Ruby source code builder.
abort() - Ends the current PStore#transaction, discarding any changes to the data store.
commit() - Ends the current PStore#transaction, committing any changes to the data store immediately.
delete(name) - Removes an object hierarchy from the data store, by name.
fetch(name, default=PStore::Error) - This method is just like PStore#, save that you may also provide a default value for the object. In the event the specified name is not found in the data store, your default will be returned instead. If you do not specify a default, PStore::Error will be raised if the object is not found.
new(file) - To construct a PStore object, pass in the file path where you would like the data to be stored.
path() - Returns the path to the data store file.
root?(name) - Returns true if the supplied name is currently in the data store.
roots() - Returns the names of all object hierarchies currently in the store.
transaction(read_only=false) - Opens a new transaction for the data store. Code executed inside a block passed to this method may read and write data to and from the data store file.