Sha256: c88640604fc48c20a6ebff2429b791b1340f5e052abb09d2286011531db32aa6
Contents?: true
Size: 862 Bytes
Versions: 18
Compression:
Stored size: 862 Bytes
Contents
# frozen_string_literal: true module Karafka module Setup class Configurators # Karafka::Params::Params are dynamically built based on user defined parent class # so we cannot just require it, we need to initialize it after user is done with # the framework configuration. This is a configurator that does exactly that. class Params < Base # Builds up Karafka::Params::Params class with user defined parent class # @param config [Karafka::Setup::Config] Config we can user to setup things def self.setup(config) return if defined? Karafka::Params::Params Karafka::Params.const_set( 'Params', Class .new(config.params_base_class) .tap { |klass| klass.include(Karafka::Params::Dsl) } ) end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems