Sha256: a9ed36ee81f83c4d274b6d869271e8402fb32c1faf369fde2309a4799c795206
Contents?: true
Size: 1.32 KB
Versions: 15
Compression:
Stored size: 1.32 KB
Contents
# frozen_string_literal: true module PriceHubble # The top-level configuration handling. # # rubocop:disable Style/ClassVars because we split module code module ConfigurationHandling extend ActiveSupport::Concern class_methods do # Retrieve the current configuration object. # # @return [Configuration] the current configuration object def configuration @@configuration ||= Configuration.new end # Configure the concern by providing a block which takes # care of this task. Example: # # FactoryBot::Instrumentation.configure do |conf| # # conf.xyz = [..] # end def configure yield(configuration) end # Reset the current configuration with the default one. def reset_configuration! @@configuration = Configuration.new end # Get back the credentials bundle for an authentication. # # @return [Hash{Symbol => String}] the identity bundle def identity_params { username: configuration.username, password: configuration.password } end # Retrieve the current configured logger instance. # # @return [Logger] the logger instance delegate :logger, to: :configuration end end # rubocop:enable Style/ClassVars end
Version data entries
15 entries across 15 versions & 1 rubygems