Sha256: 36734ed1476ea89657a030b3b6fb53db2e961ed5a747a139e51f412bbf0dec99

Contents?: true

Size: 1.99 KB

Versions: 1

Compression:

Stored size: 1.99 KB

Contents

#### Summary

The VolatileDB gem allows you to specify a key and an action yielding a particular piece of 
data.
  

This data will be stored on the file system you are currently running on. Data 
is accessible by key. Data will be read and written to storage using File.read() and File.open() 
-- that's it. It's up to the consuming application to serialize and deserialize data correctly. All 
VolatileDB does is push and pull data to the FS. 
  
If the underlying file supporting the data is found to be missing, it will be re-initialized.
  
This gets to the main idea behind VolatileDB: use it to persist data that is transient and can be 
re-seeded periodically as conditions change. 

#### Usage

    require 'volatiledb'
    db = Volatile::DB.new("/tmp")
    db.put(:foo) { "acts as" } 
    #=> :foo
    db.get(:foo) 
    #=> "acts as"
    db.get(:bar) 
    #=> nil
    db.put(:bar) { "chunky bacon" }
    db.get(:bar)
    #=> "chunky bacon"

#### License

Copyright (c) 2012 Sebastian Wittenkamp

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 
associated documentation files (the "Software", to deal in the Software without restriction, including 
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to 
the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial 
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 
THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
volatiledb-1.0.0 README.md