module RabbitMQSpec::DSL

Namespace for all DSL logic. Use this module to evaluate a string in our DSL format and fetch a world instance containing all the entities extracted from the DSL specification @example

RabbitMQSpec::DSL.evaluate(%Q{
  exchange 'name1' do
    description %Q{ My Exchange }
  end
})

Public Class Methods

evaluate(dsl) click to toggle source

@param dsl String in the DSL format to be evaluated by. @return [World] Configured by the DSL definition.

# File lib/rabbitmq-spec/dsl.rb, line 17
def self.evaluate(dsl)
  world = World.new
  world.instance_eval(dsl)
  world
end