module ActiveModel::Type

Public Class Methods

register(type_name, klass = nil, **options, &block) Show source
# File activemodel/lib/active_model/type.rb, line 28
def register(type_name, klass = nil, **options, &block)
  registry.register(type_name, klass, **options, &block)
end

Add a new type to the registry, allowing it to be gotten through ActiveModel::Type#lookup

© 2004–2018 David Heinemeier Hansson
Licensed under the MIT License.