Class: Messaging::Routing::EnqueuedRoute

Inherits:
Route
  • Object
show all
Defined in:
lib/messaging/routing/enqueued_route.rb

Overview

Internal: Used for enqueing background jobs instead of calling the handler directly

Instance Attribute Summary

Attributes inherited from Route

#handler, #matcher

Instance Method Summary collapse

Methods inherited from Route

#call, #categories, #topics

Constructor Details

#initialize(pattern, handler) ⇒ EnqueuedRoute

Returns a new instance of EnqueuedRoute.



5
6
7
8
# File 'lib/messaging/routing/enqueued_route.rb', line 5

def initialize(pattern, handler)
  super
  @handler = EnqueueMessageHandler.new(handler).method(:call)
end