Module: NatsWorker
- Defined in:
- lib/nats_worker.rb,
lib/nats_worker/cli.rb,
lib/nats_worker/runner.rb,
lib/nats_worker/worker.rb,
lib/nats_worker/railtie.rb,
lib/nats_worker/version.rb,
lib/nats_worker/configuration.rb
Defined Under Namespace
Modules: Worker
Classes: CLI, Configuration, Error, Railtie, Runner
Constant Summary
collapse
- VERSION =
"0.1.0".freeze
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
16
17
18
|
# File 'lib/nats_worker.rb', line 16
def configuration
@configuration ||= Configuration.new
end
|
12
13
14
|
# File 'lib/nats_worker.rb', line 12
def configure
yield configuration
end
|
.logger ⇒ Object
20
21
22
|
# File 'lib/nats_worker.rb', line 20
def logger
configuration.logger
end
|
.register(worker_class) ⇒ Object
29
30
31
|
# File 'lib/nats_worker.rb', line 29
def register(worker_class)
workers << worker_class unless workers.include?(worker_class)
end
|
.workers ⇒ Object
Registry of worker classes that included NatsWorker::Worker.
25
26
27
|
# File 'lib/nats_worker.rb', line 25
def workers
@workers ||= []
end
|