Exception: Nezu::Runtime::RecipientError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/nezu/runtime/recipient.rb

Class Method Summary collapse

Class Method Details

.does_not_exist(q) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/nezu/runtime/recipient.rb', line 10

def self.does_not_exist(q)
  klass = q.sub(/^#{Nezu::Config.amqp.development.queue_prefix}./, '').sub(/.#{Nezu::Config.amqp.development.queue_postfix}$/,'').classify
  message = %Q(
    The class "#{klass}" doesn`t exist or is not a child of "Nezu::Runtime::Producer".
    Please create one in \"app/producers/#{klass.underscore}.rb\" with the content of at least:

    class #{klass} < Nezu::Runtime::Producer
    end
  ).gsub(/^\s*/, '')
  self.new(message)
end