method

register

rails latest stable - Class: ActiveModel::Type
register(type_name, klass = nil, &block)
public

Add a new type to the registry, allowing it to be referenced as a symbol by {attribute}[rdoc-ref:Attributes::ClassMethods#attribute].