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

Methods included from Assertions

assert_kind_of

Methods included from Chainable

chainable, extendable

Class Method Details

.in_memory_adapter_pathString

The path used to require the in memory adapter

See Also:



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

See Also:



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

See Also:



11
12
13
14
# File 'lib/dm-core/adapters.rb', line 11

def self.new(repository_name, options)
  options = normalize_options(options)
  adapter_class(options.fetch(:adapter)).new(repository_name, options)
end