class Clamour::Message::Receive

Unpack message and reroute it using the same {Clamour::Subscription}.

Public Class Methods

perform(wired, subscription) click to toggle source

@param [Clamour::Message::Sent] wired @param [Clamour::Subscription] subscription

# File lib/clamour/message/receive.rb, line 10
def self.perform(wired, subscription)
  attributes = ActiveSupport::HashWithIndifferentAccess.new(wired.payload)
  type = attributes[:_type]
  subscription.route(type, attributes)
end