Module: Attr::Gather::Filters

Extended by:
Registrable
Defined in:
lib/attr/gather/filters.rb,
lib/attr/gather/filters/base.rb,
lib/attr/gather/filters/noop.rb,
lib/attr/gather/filters/result.rb,
lib/attr/gather/filters/contract.rb,
lib/attr/gather/filters/filtering.rb

Overview

Namespace for filters

Defined Under Namespace

Classes: Base, Contract, Filtering, Noop, Result

Class Method Summary collapse

Class Method Details

.defaultAttr::Gather::Filters::Noop

The default filter if none is specified



17
18
19
# File 'lib/attr/gather/filters.rb', line 17

def self.default
  @default = resolve(:noop)
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)