class RabbitMQSpec::DSL::Builder::Base::HashBuilder

Helper class to evaluate blocks that are passe to the defined attributes for the inhereted classes

Public Class Methods

new() click to toggle source
# File lib/rabbitmq-spec/dsl/builder/base.rb, line 82
def initialize
  @hash = {}
end

Public Instance Methods

build() click to toggle source
# File lib/rabbitmq-spec/dsl/builder/base.rb, line 86
def build
  @hash
end
method_missing(method_name, *args, &block) click to toggle source
# File lib/rabbitmq-spec/dsl/builder/base.rb, line 90
def method_missing(method_name, *args, &block)
  @hash[method_name.to_sym] = if block_given?
                                builder = HashBuilder.new
                                builder.instance_eval(&block)
                                builder.build
                              else
                                args[0]
  end
end