Module: EXEL
- Defined in:
- lib/exel.rb,
lib/exel/job.rb,
lib/exel/value.rb,
lib/exel/events.rb,
lib/exel/context.rb,
lib/exel/logging.rb,
lib/exel/version.rb,
lib/exel/ast_node.rb,
lib/exel/instruction.rb,
lib/exel/sequence_node.rb,
lib/exel/logging_helper.rb,
lib/exel/instruction_node.rb,
lib/exel/middleware/chain.rb,
lib/exel/null_instruction.rb,
lib/exel/processor_helper.rb,
lib/exel/listen_instruction.rb,
lib/exel/middleware/logging.rb,
lib/exel/error/job_termination.rb,
lib/exel/deferred_context_value.rb,
lib/exel/logging/logger_wrapper.rb,
lib/exel/processors/run_processor.rb,
lib/exel/processors/async_processor.rb,
lib/exel/processors/split_processor.rb,
lib/exel/providers/local_file_provider.rb,
lib/exel/providers/threaded_async_provider.rb
Overview
rubocop:disable Lint/InheritException
Defined Under Namespace
Modules: Error, Events, Job, Logging, LoggingHelper, Middleware, ProcessorHelper, Processors, Providers, Value Classes: ASTNode, Context, DeferredContextValue, Instruction, InstructionNode, ListenInstruction, NullInstruction, SequenceNode
Constant Summary collapse
- VERSION =
'1.5.2'
Class Method Summary collapse
-
.async_provider ⇒ Object
The currently configured async provider.
-
.configuration ⇒ Object
The current configuration.
-
.configure {|configuration| ... } ⇒ Object
Yields the configuration object to the given block.
-
.logger ⇒ Object
The currently set logger.
-
.logger=(logger) ⇒ Object
Sets the logger to be used.
- .middleware ⇒ Object
-
.remote_provider ⇒ Object
The currently configured remote provider.
Class Method Details
.async_provider ⇒ Object
Returns The currently configured async provider. Defaults to EXEL::Providers::ThreadedAsyncProvider.
42 43 44 |
# File 'lib/exel.rb', line 42 def self.async_provider configuration.async_provider || Providers::ThreadedAsyncProvider end |
.configuration ⇒ Object
Returns The current configuration.
22 23 24 |
# File 'lib/exel.rb', line 22 def self.configuration @config ||= OpenStruct.new(middleware: Middleware::Chain.new) end |
.configure {|configuration| ... } ⇒ Object
Yields the configuration object to the given block. Configuration can include:
-
async_provider
Set an async provider. Defaults to EXEL::Providers::ThreadedAsyncProvider -
remote_provider
Set a remote provider. Defaults to EXEL::Providers::LocalFileProvider -
Any configuration required by the async/remote providers
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
37 38 39 |
# File 'lib/exel.rb', line 37 def self.configure yield configuration end |
.logger ⇒ Object
Returns The currently set logger.
10 11 12 |
# File 'lib/exel.rb', line 10 def self.logger EXEL::Logging.logger end |
.logger=(logger) ⇒ Object
Sets the logger to be used.
17 18 19 |
# File 'lib/exel.rb', line 17 def self.logger=(logger) EXEL::Logging.logger = logger end |
.middleware ⇒ Object
51 52 53 |
# File 'lib/exel.rb', line 51 def self.middleware configuration.middleware end |
.remote_provider ⇒ Object
Returns The currently configured remote provider. Defaults to EXEL::Providers::LocalFileProvider.
47 48 49 |
# File 'lib/exel.rb', line 47 def self.remote_provider configuration.remote_provider || Providers::LocalFileProvider end |