Skip to content

PStore based on Oj

Notifications You must be signed in to change notification settings

mblumtritt/oj-pstore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oj-pstore gem

This gem implements a PStore alternative using the fast Oj gem.

Use Bundler to add TCPClient in your own project:

Include in your Gemfile:

gem 'oj-pstore'

and install it by running Bundler:

bundle

To install the gem globally use:

gem install oj-pstore

After that you need only a single line of code in your project to have it on board:

require 'oj/store'

Documentation

The gem supports the PStore API.

Sample

# change a configuration value
require 'oj/store'

config = Oj::Store.new('config.json')
config.transaction{ config[:last_used] = Time.now }