parse

in lib/generators/aws_record/generated_attribute.rb [21:32]


        def parse(field_definition)
          name, type, opts = field_definition.split(':')
          type = "string" if not type
          type, opts = "string", type if OPTS.any? { |opt| type.include? opt }

          opts = opts.split(',') if opts
          type, opts = parse_type_and_options(name, type, opts)
          validate_opt_combs(name, type, opts)

          new(name, type, opts)
        end