Sha256: 16e77c7289bd6542a452fd3cbd51c4838fa76330fb6dd03c19207b3e1ef5fd33

Contents?: true

Size: 825 Bytes

Versions: 2

Compression:

Stored size: 825 Bytes

Contents

# frozen_string_literal: true

# External components
%w[
  rake
  rubygems
  bundler
  logger
  pathname
  json
  kafka
  forwardable
  connection_pool
  null_logger
  dry-configurable
].each { |lib| require lib }

# Internal components
base_path = File.dirname(__FILE__) + '/water_drop'

%w[
  version
  producer_proxy
  pool
  config
  message
].each { |lib| require "#{base_path}/#{lib}" }

# WaterDrop library
module WaterDrop
  class << self
    attr_writer :logger

    # @return [Logger] logger that we want to use
    def logger
      @logger ||= NullLogger.new
    end

    # Sets up the whole configuration
    # @param [Block] block configuration block
    def setup(&block)
      Config.setup(&block)
    end

    # @return [WaterDrop::Config] config instance
    def config
      Config.config
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
waterdrop-0.4.0 lib/water_drop.rb
waterdrop-0.3.2.4 lib/water_drop.rb