Module: DataMapper::Adapters
- Extended by:
- Assertions, Chainable
- Defined in:
- lib/dm-core/adapters.rb,
lib/dm-core/adapters/abstract_adapter.rb,
lib/dm-core/adapters/in_memory_adapter.rb
Defined Under Namespace
Classes: AbstractAdapter, InMemoryAdapter
Class Method Summary collapse
-
.in_memory_adapter_path ⇒ String
The path used to require the in memory adapter.
-
.in_memory_adapter_path=(path) ⇒ Object
The path used to require the in memory adapter.
-
.new(repository_name, options) ⇒ Object
private
Set up an adapter for a storage engine.
Methods included from Chainable
Methods included from Assertions
Class Method Details
.in_memory_adapter_path ⇒ String
The path used to require the in memory adapter
40 41 42 |
# File 'lib/dm-core/adapters.rb', line 40 def self.in_memory_adapter_path @in_memory_adapter_path ||= 'dm-core/adapters/in_memory_adapter' end |
.in_memory_adapter_path=(path) ⇒ Object
The path used to require the in memory adapter
Set this if you want to register your own adapter to be used when you specify an ‘in_memory’ connection during
28 29 30 |
# File 'lib/dm-core/adapters.rb', line 28 def self.in_memory_adapter_path=(path) @in_memory_adapter_path = path end |
.new(repository_name, options) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Set up an adapter for a storage engine
11 12 13 14 |
# File 'lib/dm-core/adapters.rb', line 11 def self.new(repository_name, ) = () adapter_class(.fetch(:adapter)).new(repository_name, ) end |