Module: Karafka::Patches::DryConfigurable

Defined in:
lib/karafka/patches/dry_configurable.rb

Overview

Patch that will allow to use proc based lazy evaluated settings with Dry Configurable

Instance Method Summary collapse

Instance Method Details

#initialize(*args) ⇒ Object

We overwrite ::Dry::Configurable::Config to change on proc behaviour Unfortunately it does not provide an on call proc evaluation, so this feature had to be added here on demand/

Parameters:

  • args

    Any arguments that DryConfigurable::Config accepts



13
14
15
16
17
# File 'lib/karafka/patches/dry_configurable.rb', line 13

def initialize(*args)
  super

  @config.each_key(&method(:rebuild))
end