Sha256: aafa283901cf5f1c3658ee7a1245b51fe7070f7177d4b0f72c89c473697f525a
Contents?: true
Size: 513 Bytes
Versions: 12
Compression:
Stored size: 513 Bytes
Contents
module HoboFields FieldsDeclaration = classy_module do def self.fields(&b) # Any model that calls 'fields' gets a bunch of other # functionality included automatically, but make sure we only include it once include HoboFields::ModelExtensions unless HoboFields::ModelExtensions.in?(included_modules) if b dsl = FieldDeclarationDsl.new(self) if b.arity == 1 yield dsl else dsl.instance_eval(&b) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems