Module: Attr::Gather::Aggregators

Extended by:
Registrable
Defined in:
lib/attr/gather/aggregators.rb,
lib/attr/gather/aggregators/base.rb,
lib/attr/gather/aggregators/deep_merge.rb,
lib/attr/gather/aggregators/shallow_merge.rb

Overview

Namespace for aggregators

Defined Under Namespace

Classes: Base, DeepMerge, ShallowMerge

Class Method Summary collapse

Class Method Details

.defaultAttr::Gather::Aggregators::DeepMerge

The default aggregator if none is specified



15
16
17
# File 'lib/attr/gather/aggregators.rb', line 15

def self.default
  @default = resolve(:deep_merge)
end

.ensure_name_not_already_registered!(name) ⇒ Object Originally defined in module Registrable

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

.register(name) {|options| ... } ⇒ Object Originally defined in module Registrable

Register item so it can be accessed by name

Parameters:

  • name (Symbol)

    name of the item

Yields:

  • (options)

    block to initialize the item

.resolve(name, *args, **opts) ⇒ #call Originally defined in module Registrable

Resolve a named item

Parameters:

  • name (Symbol)

Returns:

  • (#call)