Sha256: 18ea0de9631d63038374ee74698bf01f873f3cb6d162b93b4ec0626f3ad1b572
Contents?: true
Size: 644 Bytes
Versions: 6
Compression:
Stored size: 644 Bytes
Contents
require 'railroad/ar_model' require 'railroad/dm_model' # A factory for discovering the ORM being used that will then return the # corresponding "model" that will be used to interact with the ORM. Will # return nil if unable to discover a supported ORM. # # Dec 2008 - Roy Wright # created to support multiple ORMs # class ModelFactory def self.getModel(klass, options) model = nil model = AR_Model.new(klass, options) if klass.respond_to?'reflect_on_all_associations' model = DM_Model.new(klass, options) if klass.respond_to?'relationships' model end private # prevent instantiation def initialize end end
Version data entries
6 entries across 6 versions & 2 rubygems