class CrystalMQ::Producer::ProducerPayload
Attributes
message[R]
topic[R]
Public Class Methods
from_msgpack(h)
click to toggle source
# File lib/crystalmq.rb, line 87 def self.from_msgpack h @topic = h["topic"] @message = h["message"] end
new(topic, message)
click to toggle source
# File lib/crystalmq.rb, line 78 def initialize(topic, message) @topic = topic @message = message end
Public Instance Methods
to_msgpack()
click to toggle source
# File lib/crystalmq.rb, line 83 def to_msgpack { "topic" => @topic, "message" => @message }.to_msgpack end