class Karafka::Routing::Proxy
objects.
Proxy is used as a translation layer in between the DSL and raw topic and consumer group
def initialize(target, &block)
- Yield: - Evaluates block in the proxy context
Parameters:
-
target
(Object
) -- target object to which we proxy any DSL call
def initialize(target, &block) @target = target instance_eval(&block) end
def method_missing(method_name, *arguments, &block)
def method_missing(method_name, *arguments, &block) return super unless respond_to_missing?(method_name) @target.public_send(:"#{method_name}=", *arguments, &block) end
def respond_to_missing?(method_name, include_private = false)
def respond_to_missing?(method_name, include_private = false) return false if IGNORED_POSTFIXES.any? { |postfix| method_name.to_s.end_with?(postfix) } @target.respond_to?(:"#{method_name}=", include_private) || super end