Class: Eventboss::Sender
- Inherits:
-
Object
- Object
- Eventboss::Sender
- Defined in:
- lib/eventboss/sender.rb
Instance Method Summary collapse
-
#initialize(client:, queue:) ⇒ Sender
constructor
A new instance of Sender.
- #send_batch(payload) ⇒ Object
Constructor Details
#initialize(client:, queue:) ⇒ Sender
Returns a new instance of Sender.
3 4 5 6 |
# File 'lib/eventboss/sender.rb', line 3 def initialize(client:, queue:) @client = client @queue = queue end |
Instance Method Details
#send_batch(payload) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/eventboss/sender.rb', line 8 def send_batch(payload) client.( queue_url: queue.url, entries: Array(build_entries(payload)) ) end |