Class: Karafka::Routing::Features::Base::Expander

Inherits:
Module
  • Object
show all
Defined in:
lib/karafka/routing/features/base/expander.rb

Overview

Routing builder expander that injects feature related drawing operations into it

Instance Method Summary collapse

Constructor Details

#initialize(scope) ⇒ Expander

Returns builder expander instance.

Parameters:

  • scope (Module)

    feature scope in which contract and other things should be



11
12
13
14
# File 'lib/karafka/routing/features/base/expander.rb', line 11

def initialize(scope)
  super()
  @scope = scope
end

Instance Method Details

#prepended(mod) ⇒ Object

Builds anonymous module that alters how #draw behaves allowing the feature contracts to run.

Parameters:



19
20
21
22
23
# File 'lib/karafka/routing/features/base/expander.rb', line 19

def prepended(mod)
  super

  mod.prepend(prepended_module)
end