Module: ShyCouch

Defined in:
lib/ShyCouch.rb,
lib/ShyCouch/data.rb,
lib/ShyCouch/fields.rb

Defined Under Namespace

Modules: Data, Fields Classes: CouchDatabase, DatabaseError, DesignConflict, DocumentValidationError, ResourceNotFound, ShyCouchDesignMissing, ShyCouchError, ViewError

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#databaseObject

Returns the value of attribute database.



30
31
32
# File 'lib/ShyCouch.rb', line 30

def database
  @database
end

Class Method Details

.getDB(settings) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/ShyCouch.rb', line 22

def getDB(settings)
  # this is a wrapper for creating CouchDatabase object and testing that it can connect
  database = CouchDatabase.new(settings)
  puts database.connect unless database.connect["ok"] #TODO - hm
  database.create! unless database.exists?
  return database
end