Class: Substation::Chain::DSL::ModuleBuilder

Inherits:
Object
  • Object
show all
Includes:
Adamantium::Flat
Defined in:
lib/substation/chain/dsl/module_builder.rb

Overview

Builds a Module suitable for a Substation::Chain::DSL instance

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(registry) ⇒ undefined

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.

Initialize a new instance

Parameters:

  • registry (Hash<Symbol, Processor::Builder>)

    the registry of processor builders to define methods for


39
40
41
42
43
# File 'lib/substation/chain/dsl/module_builder.rb', line 39

def initialize(registry)
  @registry   = registry
  @dsl_module = Module.new
  initialize_dsl_module
end

Instance Attribute Details

#dsl_moduleModule (readonly)

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.

A module suitable for inclusion in a Substation::Chain::DSL instance

Returns:

  • (Module)

29
30
31
# File 'lib/substation/chain/dsl/module_builder.rb', line 29

def dsl_module
  @dsl_module
end

Class Method Details

.call(registry) ⇒ Module

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.

Builds a new Module targeted for a Substation::Chain::DSL instance

Parameters:

Returns:

  • (Module)

18
19
20
# File 'lib/substation/chain/dsl/module_builder.rb', line 18

def self.call(registry)
  new(registry).dsl_module
end