Class: WaterDrop::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/water_drop/config.rb

Overview

Configurator for setting up all options required by WaterDrop

Constant Summary collapse

OPTIONS =

Available options

%i(
  connection_pool_size
  connection_pool_timeout
  kafka_ports
  kafka_host
  send_messages
  raise_on_failure
)

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject

Returns the value of attribute config.



5
6
7
# File 'lib/water_drop/config.rb', line 5

def config
  @config
end

Class Method Details

.setup(&block) ⇒ Object

Configurating method



35
36
37
38
39
40
# File 'lib/water_drop/config.rb', line 35

def self.setup(&block)
  self.config = new

  block.call(config)
  config.freeze
end