Skip to content
ConcordConcordConcord

Component.new

Creates a new ComponentClass and registers it by name.

← Component

Creates a new ComponentClass and registers it by name.

Component("name", populate?) is equivalent to this function. Populate receives the new component instance and :give / :ensure arguments.

component = Component.new( name, populate )
Name Type Description
name string Unique name of the ComponentClass
populate fun(component: Component, …): nil Function that populates a Component with values
Name Type Description
component ComponentClass