Method: DataModel::Type#instantiate

Defined in:
lib/data_model/type.rb

#instantiate(name, args: {}, params: nil) ⇒ Type

instanciate another type by name

Parameters:

  • name (Symbol)

    the name of the type to instantiate

  • args (Hash) (defaults to: {})

    type arguments, configures the reading Process

  • params (Array) (defaults to: nil)

    type parameters, configures the type itself

Returns:

  • (Type)

    the instantiated type



47
48
49
50
51
# File 'lib/data_model/type.rb', line 47

def instantiate(name, args: {}, params: nil)
	t = @type_registry.type(name, args:, params:)

	return t
end