Class: RDKit::DB

Inherits:
Object show all
Includes:
HashMethods, KeyMethods, ListMethods, SetMethods, StringMethods
Defined in:
lib/rdkit/db.rb

Defined Under Namespace

Modules: HashMethods, KeyMethods, ListMethods, SetMethods, StringMethods

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashMethods

#hdel, #hexists?, #hget, #hkeys, #hlen, #hset, #hvals

Methods included from SetMethods

#sadd, #scard, #sismember, #smembers, #srem

Methods included from ListMethods

#llen, #lpop, #lpush, #lrange, #rpop

Methods included from KeyMethods

#del, #exists?, #filter_keys, #type

Methods included from StringMethods

#get, #getset, #set, #setnx

Constructor Details

#initialize(index = 0) ⇒ DB

Returns a new instance of DB.



5
6
7
8
9
# File 'lib/rdkit/db.rb', line 5

def initialize(index=0)
  @index = index

  flush!
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index.



3
4
5
# File 'lib/rdkit/db.rb', line 3

def index
  @index
end

Instance Method Details

#flush!Object



11
12
13
# File 'lib/rdkit/db.rb', line 11

def flush!
  @objects = {}
end