Class: Karafka::Routing::Proxy
- Inherits:
-
Object
- Object
- Karafka::Routing::Proxy
- Defined in:
- lib/karafka/routing/proxy.rb
Overview
Proxy is used as a translation layer in between the DSL and raw topic and consumer group objects.
Instance Attribute Summary collapse
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(target, &block) ⇒ Proxy
constructor
A new instance of Proxy.
-
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Tells whether or not a given element exists on the target.
Constructor Details
#initialize(target, &block) ⇒ Proxy
Returns a new instance of Proxy.
12 13 14 15 |
# File 'lib/karafka/routing/proxy.rb', line 12 def initialize(target, &block) @target = target instance_eval(&block) end |
Instance Attribute Details
#target ⇒ Object (readonly)
Returns the value of attribute target.
8 9 10 |
# File 'lib/karafka/routing/proxy.rb', line 8 def target @target end |
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Tells whether or not a given element exists on the target
37 38 39 40 41 |
# File 'lib/karafka/routing/proxy.rb', line 37 def respond_to_missing?(method_name, include_private = false) @target.respond_to?(:"#{method_name}=", include_private) || @target.respond_to?(method_name, include_private) || super end |