Sha256: 64130b5ed2d50cb543806f58e9d831d5bd70507bb716047b7b5d712a36b71ac2

Contents?: true

Size: 570 Bytes

Versions: 4

Compression:

Stored size: 570 Bytes

Contents

require 'orm_adapter/base'
require 'orm_adapter/to_adapter'
require 'orm_adapter/version'

module OrmAdapter
  # A collection of registered adapters
  def self.adapters
    @@adapters ||= []
  end

  # All model classes from all registered adapters
  def self.model_classes
    self.adapters.map { |a| a.model_classes }.flatten
  end
end

require 'orm_adapter/adapters/active_record' if defined?(ActiveRecord::Base)
require 'orm_adapter/adapters/data_mapper'   if defined?(DataMapper::Resource)
require 'orm_adapter/adapters/mongoid'       if defined?(Mongoid::Document)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
orm_adapter-0.0.4 lib/orm_adapter.rb
orm_adapter-0.0.3 lib/orm_adapter.rb
orm_adapter-0.0.2 lib/orm_adapter.rb
orm_adapter-0.0.1 lib/orm_adapter.rb