Module: Couch

Defined in:
lib/couch.rb

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

.databaseObject



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

.disconnectObject



18
19
20
# File 'lib/couch.rb', line 18

def self.disconnect
  Thread.current[:database] = nil
end