Module: ROM::Components Private

Extended by:
Dry::Core::Container::Mixin, Enumerable
Defined in:
lib/rom/components.rb,
lib/rom/components/dsl.rb,
lib/rom/components/core.rb,
lib/rom/components/view.rb,
lib/rom/components/mapper.rb,
lib/rom/components/schema.rb,
lib/rom/components/command.rb,
lib/rom/components/dataset.rb,
lib/rom/components/gateway.rb,
lib/rom/components/dsl/core.rb,
lib/rom/components/dsl/view.rb,
lib/rom/components/provider.rb,
lib/rom/components/registry.rb,
lib/rom/components/relation.rb,
lib/rom/components/dsl/mapper.rb,
lib/rom/components/dsl/schema.rb,
lib/rom/components/association.rb,
lib/rom/components/dsl/command.rb,
lib/rom/components/dsl/dataset.rb,
lib/rom/components/dsl/gateway.rb,
lib/rom/components/dsl/relation.rb,
lib/rom/components/dsl/association.rb,
lib/rom/compat/components/dsl/schema.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Modules: DSL Classes: Association, Command, Core, Dataset, Gateway, Handler, Mapper, Provider, Registry, Relation, Schema, View

Class Method Summary collapse

Class Method Details

.eachObject

Iterate over all registered component handlers



49
50
51
# File 'lib/rom/components.rb', line 49

def each
  keys.each { |key| yield(resolve(key)) }
end

.register(key, constant = nil, **options) ⇒ Components

Returns:

See Also:



37
38
39
40
41
42
43
44
# File 'lib/rom/components.rb', line 37

def register(key, constant = nil, **options)
  Handler.new(key: key, constant: constant, **options).tap do |handler|
    super(handler.key, handler)
    # TODO: unify handler access
    super(handler.namespace, handler)
  end
  self
end