Module: Pickle::Adapter::Base

Overview

Include this module into your ORM adapter this will register the adapter with pickle and it will be picked up for you To create an adapter you should create an inner constant “PickleAdapter”

e.g. ActiveRecord::Base::PickleAdapter

See Also:

  • pickle/adapters/active_record
  • pickle/adapters/datamapper
  • pickle/adapters/mongoid

Class Method Summary collapse

Class Method Details

.adaptersObject

A collection of registered adapters



43
44
45
# File 'lib/pickle/adapter.rb', line 43

def self.adapters
  @@adapters ||= []
end

.included(base) ⇒ Object



38
39
40
# File 'lib/pickle/adapter.rb', line 38

def self.included(base)
  adapters << base
end