Sha256: 2c80f92e24a4f3c2a81c4bde325fb09d049461f9fd86e2a0269c7f615374dab0
Contents?: true
Size: 567 Bytes
Versions: 7
Compression:
Stored size: 567 Bytes
Contents
module PR class DefineAndRegister class << self def [] klass, name, type, options = {} new(klass).define_and_register name, type, options end end def initialize klass @registry = FieldRegistry[klass] @klass = klass end def define_and_register name, type, options register name, define(name,type,options) end def register name, field @registry.register name, field end def define name, type, options = {} DefineField[ @klass, name, Fields[type], options ] end end end
Version data entries
7 entries across 7 versions & 1 rubygems