class RabbitMQSpec::DSL::World

Class to generate instances for the DSL evaluation @api private @attr exchanges [Array<RabbitMQSpec::Entity::Exchange>] @attr single_queues [Array<RabbitMQSpec::Entity::Queue>]

Attributes

exchanges[R]
single_queues[R]

Public Class Methods

new() click to toggle source
# File lib/rabbitmq-spec/dsl/world.rb, line 10
def initialize
  @exchanges = []
  @single_queues = []
end

Public Instance Methods

exchange(name, &block) click to toggle source

DSL exchange keyword @attr name [String] Name of the exchange @yield Block to be evaluated on RabbitMQSpec::DSL::Builder::Exchange build proccess

# 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, &block) click to toggle source

DSL queue keyword @attr name [String] Name of the queue @yield Block to be evaluated on RabbitMQSpec::DSL::Builder::Exchange build proccess

# 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