Class: AmqpUtils::MessageFormatter::Message

Inherits:
Base
  • Object
show all
Defined in:
lib/amqp_utils/message_formatter.rb

Instance Method Summary collapse

Methods inherited from Base

inherited

Instance Method Details

#generate(io, header, message) ⇒ Object



56
57
58
# File 'lib/amqp_utils/message_formatter.rb', line 56

def generate(io, header, message)
  io.puts message
end

#load(io) ⇒ Object



60
61
62
63
# File 'lib/amqp_utils/message_formatter.rb', line 60

def load(io)
  msg = io.gets
  msg ? { 'message' => msg } : nil
end