Sha256: c8f3fd73de98f05e72dd0c49d421cd51a16804a92b6e9181573485aea3aabd4c
Contents?: true
Size: 439 Bytes
Versions: 54
Compression:
Stored size: 439 Bytes
Contents
module Para module ModelFieldParsers class Enums < Para::ModelFieldParsers::Base register :enums, self def parse! model.defined_enums.each do |key, _| fields_hash[key] = AttributeField::EnumField.new( model, name: key, type: 'enum' ) end end def applicable? model.respond_to?(:defined_enums) && !model.defined_enums.empty? end end end end
Version data entries
54 entries across 54 versions & 1 rubygems