Sha256: 04c623351c488a18ec967bbf7cfce0f1b7185d371537f9918db4f904510dc8d2
Contents?: true
Size: 406 Bytes
Versions: 6
Compression:
Stored size: 406 Bytes
Contents
class MetaInformation attr_reader :associations def initialize(klass) @associations = {} @klass = klass end def add_has_one(model, options) @associations[model] = HasOne.new(@klass, model, options) end def add_has_many(model, options) @associations[model] = HasMany.new(@klass, model, options) end def add_has_admins(options) add_has_many(:admins, options) end end
Version data entries
6 entries across 6 versions & 1 rubygems