Module: Wgit::Database
- Defined in:
- lib/wgit/database/database.rb,
lib/wgit/database/database_adapter.rb,
lib/wgit/database/adapters/mongo_db.rb,
lib/wgit/database/adapters/in_memory.rb
Overview
Module providing a Database connection and CRUD operations for the Url and Document collections that form the Wgit persistence layer.
Defined Under Namespace
Classes: DatabaseAdapter, InMemory, MongoDB
Constant Summary collapse
Class Attribute Summary collapse
-
.adapter_class ⇒ Object
The Database adapter class to use with Wgit.
Class Method Summary collapse
-
.new(connection_string = nil) ⇒ Object
Initializes a DatabaseAdapter instance.
Class Attribute Details
.adapter_class ⇒ Object
The Database adapter class to use with Wgit. The adapter you supply should be a subclass of Wgit::Database::DatabaseAdapter and should implement the methods within it, in order to work with Wgit.
20 21 22 |
# File 'lib/wgit/database/database.rb', line 20 def adapter_class @adapter_class end |
Class Method Details
.new(connection_string = nil) ⇒ Object
Initializes a DatabaseAdapter instance. Is an alias for:
Wgit::Database.adapter_class.new(connection_string)
30 31 32 |
# File 'lib/wgit/database/database.rb', line 30 def self.new(connection_string = nil) Wgit::Database.adapter_class.new(connection_string) end |