123456789_123456789_123456789_123456789_123456789_

Module: ActiveModel::Type

Class Method Summary

Class Method Details

.register(type_name, klass = nil, &block)

Add a new type to the registry, allowing it to be referenced as a symbol by attribute.

[ GitHub ]

  
# File 'activemodel/lib/active_model/type.rb', line 30

def register(type_name, klass = nil, &block)
  registry.register(type_name, klass, &block)
end