Skip to content
Newer
Older
100644 29 lines (18 sloc) 506 Bytes
63e6edb @wmorgan initial version
authored Jun 16, 2011
1 LevelDB Ruby bindings.
2
3 Do this:
4
5 gem install leveldb-ruby
6
7
8 And then run this:
9
10 require 'rubygems' # on ruby < 1.9
11 require 'leveldb'
12
13 db = LevelDB.new "/tmp/asdf"
14 db.put "it", "works"
15 db.get "it"
16
17 Only a very few operations are supported right now:
0ed2f71 @wmorgan minor readme update
authored Jun 16, 2011
18
19 DB.new # creates or loads as necessary
20 DB.create # dies if it already exists
21 DB.load # dies unless it alread exists
22
23 DB#get # alias: DB#[]
24 DB#put # alias: DB#[]=
25 DB#delete
26
27 DB#each
28 ... and all the enumerable methods
Something went wrong with that request. Please try again.