Module: Couch
Defined Under Namespace
Modules: DocExtensions, Log
Classes: Database, DocView, Document, Error, Error404, Server, View
Class Method Summary
collapse
Class Method Details
.connect(host, port, db, recreate = false) ⇒ Object
14
15
16
|
# File 'lib/couch.rb', line 14
def self.connect(host, port, db, recreate=false)
self.database = Database.new host, port, db, recreate
end
|
6
7
8
|
# File 'lib/couch.rb', line 6
def self.database
Thread.current[:database]
end
|
.database=(database) ⇒ Object
10
11
12
|
# File 'lib/couch.rb', line 10
def self.database=(database)
Thread.current[:database] = database
end
|
.disconnect ⇒ Object
18
19
20
|
# File 'lib/couch.rb', line 18
def self.disconnect
Thread.current[:database] = nil
end
|