lib/qsagi/message.rb in qsagi-0.0.3 vs lib/qsagi/message.rb in qsagi-0.1.0
- old
+ new
@@ -1,22 +1,18 @@
module Qsagi
class Message
attr_reader :payload
- def initialize(message, payload)
- @message = message
+ def initialize(delivery_details, payload)
+ @delivery_details = delivery_details
@payload = payload
end
def delivery_tag
- _delivery_details[:delivery_tag]
+ @delivery_details.delivery_tag
end
def exchange
- _delivery_details[:exchange]
- end
-
- def _delivery_details
- @delivery_details ||= @message.fetch(:delivery_details, {})
+ @delivery_details.exchange
end
end
end