Module: TypedBus
- Defined in:
- lib/typed_bus.rb,
lib/typed_bus/stats.rb,
lib/typed_bus/channel.rb,
lib/typed_bus/version.rb,
lib/typed_bus/delivery.rb,
lib/typed_bus/message_bus.rb,
lib/typed_bus/configuration.rb,
lib/typed_bus/delivery_tracker.rb,
lib/typed_bus/dead_letter_queue.rb
Defined Under Namespace
Classes: Channel, Configuration, DeadLetterQueue, Delivery, DeliveryTracker, MessageBus, Stats
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
-
.configuration ⇒ Configuration
The global Configuration instance.
-
.configuration=(config) ⇒ Object
Replace the global Configuration.
-
.configure {|configuration| ... } ⇒ Object
Yield the global Configuration for block-style setup.
-
.logger ⇒ Logger?
Shortcut — read the global logger.
-
.logger=(log) ⇒ Object
Shortcut — set the global logger.
-
.reset_configuration! ⇒ Object
Restore factory defaults (useful in tests).
Class Method Details
.configuration ⇒ Configuration
The global Configuration instance.
20 21 22 |
# File 'lib/typed_bus.rb', line 20 def configuration @configuration ||= Configuration.new end |
.configuration=(config) ⇒ Object
Replace the global Configuration.
26 27 28 |
# File 'lib/typed_bus.rb', line 26 def configuration=(config) @configuration = config end |
.configure {|configuration| ... } ⇒ Object
Yield the global Configuration for block-style setup.
37 38 39 |
# File 'lib/typed_bus.rb', line 37 def configure yield configuration end |
.logger ⇒ Logger?
Shortcut — read the global logger.
48 49 50 |
# File 'lib/typed_bus.rb', line 48 def logger configuration.logger end |
.logger=(log) ⇒ Object
Shortcut — set the global logger.
54 55 56 |
# File 'lib/typed_bus.rb', line 54 def logger=(log) configuration.logger = log end |
.reset_configuration! ⇒ Object
Restore factory defaults (useful in tests).
42 43 44 |
# File 'lib/typed_bus.rb', line 42 def reset_configuration! @configuration = Configuration.new end |