method

register

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: Registry
register(type_name, klass = nil, &block) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activemodel/lib/active_model/type/registry.rb, line 15
      def register(type_name, klass = nil, &block)
        unless block_given?
          block = proc { |_, *args| klass.new(*args) }
          block.ruby2_keywords if block.respond_to?(:ruby2_keywords)
        end
        registrations[type_name] = block
      end
Register or log in to add new notes.