Module: Barbeque::Message
- Defined in:
- lib/barbeque/message.rb,
lib/barbeque/message/base.rb,
lib/barbeque/message/job_retry.rb,
lib/barbeque/message/notification.rb,
lib/barbeque/message/job_execution.rb,
lib/barbeque/message/invalid_message.rb
Defined Under Namespace
Classes: Base, InvalidMessage, JobExecution, JobRetry, Notification
Class Method Summary collapse
Class Method Details
.parse(raw_message) ⇒ Barbeque::Message::Base
13 14 15 16 17 18 19 20 |
# File 'lib/barbeque/message.rb', line 13 def parse() body = JSON.parse(.body) klass = find_class(body['Type']) klass.new(, body) rescue JSON::ParserError => e ExceptionHandler.handle_exception(e) InvalidMessage.new(, {}) end |