module EXEL

Provides methods to configure EXEL

rubocop:disable Lint/InheritException

Constants

VERSION

Public Class Methods

async_provider() click to toggle source

@return The currently configured async provider. Defaults to EXEL::Providers::ThreadedAsyncProvider

# File lib/exel.rb, line 42
def self.async_provider
  configuration.async_provider || Providers::ThreadedAsyncProvider
end
configuration() click to toggle source

@return The current configuration

# File lib/exel.rb, line 22
def self.configuration
  @config ||= OpenStruct.new(middleware: Middleware::Chain.new)
end
configure() { |configuration| ... } click to toggle source

Yields the configuration object to the given block. Configuration can include:

Typically, async_provider and remote_provider will be automatically set upon requiring those gems.

Example:

EXEL.configure do |config|
  config.s3_bucket = 'my_bucket'
end
# File lib/exel.rb, line 37
def self.configure
  yield configuration
end
logger() click to toggle source

@return The currently set logger

# File lib/exel.rb, line 10
def self.logger
  EXEL::Logging.logger
end
logger=(logger) click to toggle source

Sets the logger to be used.

@param [Logger] The logger to set. Must comply with the Ruby Logger interface

# File lib/exel.rb, line 17
def self.logger=(logger)
  EXEL::Logging.logger = logger
end
middleware() click to toggle source
# File lib/exel.rb, line 51
def self.middleware
  configuration.middleware
end
remote_provider() click to toggle source

@return The currently configured remote provider. Defaults to EXEL::Providers::LocalFileProvider

# File lib/exel.rb, line 47
def self.remote_provider
  configuration.remote_provider || Providers::LocalFileProvider
end