Module: Karafka::Core::Configurable::ClassMethods
- Defined in:
- lib/karafka/core/configurable.rb
Overview
Class related methods
Instance Method Summary collapse
-
#config ⇒ Node
Root node for the settings.
-
#configure(&block) ⇒ Object
Allows for a per class configuration (if needed).
-
#setting ⇒ Object
Pipes the settings setup to the config root node.
Instance Method Details
#config ⇒ Node
Returns root node for the settings.
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/karafka/core/configurable.rb', line 49 def config return @config if @config # This will handle inheritance @config = if superclass.respond_to?(:config) superclass.config.deep_dup else Node.new(:root) end end |
#configure(&block) ⇒ Object
Allows for a per class configuration (if needed)
62 63 64 |
# File 'lib/karafka/core/configurable.rb', line 62 def configure(&block) config.configure(&block) end |
#setting ⇒ Object
Pipes the settings setup to the config root node
67 68 69 |
# File 'lib/karafka/core/configurable.rb', line 67 def setting(...) config.setting(...) end |