Sha256: 130b42444ddd88c5fe56fefbaa96f7828baf5dcd7844388025b3b94004003970

Contents?: true

Size: 589 Bytes

Versions: 2

Compression:

Stored size: 589 Bytes

Contents

# frozen_string_literal: true

require 'api_proxy/version'

module ApiProxy
  autoload :Config, 'api_proxy/config'
  autoload :Middleware, 'api_proxy/middleware'
  autoload :RequestOptionsBuilder, 'api_proxy/request_options_builder'
  autoload :Request, 'api_proxy/request'

  def self.configuration(namespace)
    @configuration ||= {}
    @configuration[namespace] ||= Config.new
  end

  # @example
  #   ApiProxy.setup(:namespace) do |config|
  #     config.api_host = '192.168.99.100'
  #   end
  #
  def self.setup(namespace = :default)
    yield(configuration(namespace))
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
api_proxy-0.1.2 lib/api_proxy.rb
api_proxy-0.1.1 lib/api_proxy.rb