Module: RabbitMQSpec::DSL

Defined in:
lib/rabbitmq-spec/dsl.rb

Overview

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

Examples:

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

Defined Under Namespace

Classes: Builder, World

Class Method Summary collapse

Class Method Details

.evaluate(dsl) ⇒ World

Returns Configured by the DSL definition.

Parameters:

  • dsl

    String in the DSL format to be evaluated by.

Returns:

  • (World)

    Configured by the DSL definition.



17
18
19
20
21
# File 'lib/rabbitmq-spec/dsl.rb', line 17

def self.evaluate(dsl)
  world = World.new
  world.instance_eval(dsl)
  world
end