Class: RabbitMQSpec::DSL::World Private
- Inherits:
-
Object
- Object
- RabbitMQSpec::DSL::World
- Defined in:
- lib/rabbitmq-spec/dsl/world.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class to generate instances for the DSL evaluation
Instance Attribute Summary collapse
-
#exchanges ⇒ Array<RabbitMQSpec::Entity::Exchange>
private
The current value of exchanges.
-
#single_queues ⇒ Array<RabbitMQSpec::Entity::Queue>
private
The current value of single_queues.
Instance Method Summary collapse
-
#exchange(name) { ... } ⇒ void
private
DSL exchange keyword.
-
#initialize ⇒ World
constructor
private
A new instance of World.
-
#queue(name) { ... } ⇒ void
private
DSL queue keyword.
Constructor Details
#initialize ⇒ World
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of World.
10 11 12 13 |
# File 'lib/rabbitmq-spec/dsl/world.rb', line 10 def initialize @exchanges = [] @single_queues = [] end |
Instance Attribute Details
#exchanges ⇒ Array<RabbitMQSpec::Entity::Exchange>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the current value of exchanges.
6 7 8 |
# File 'lib/rabbitmq-spec/dsl/world.rb', line 6 def exchanges @exchanges end |
#single_queues ⇒ Array<RabbitMQSpec::Entity::Queue>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the current value of single_queues.
6 7 8 |
# File 'lib/rabbitmq-spec/dsl/world.rb', line 6 def single_queues @single_queues end |
Instance Method Details
#exchange(name) { ... } ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
DSL exchange keyword
18 19 20 21 |
# File 'lib/rabbitmq-spec/dsl/world.rb', line 18 def exchange(name, &block) new_exchange = RabbitMQSpec::DSL::Builder::Exchange.build(name: name, &block) @exchanges << new_exchange end |
#queue(name) { ... } ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
DSL queue keyword
26 27 28 29 |
# File 'lib/rabbitmq-spec/dsl/world.rb', line 26 def queue(name, &block) new_queue = RabbitMQSpec::DSL::Builder::Queue.build(name: name, &block) @single_queues << new_queue end |