Sha256: a9d190c40643b6bb54a72b8b05d90e64756f192e69cdf816d65a61dd84999739
Contents?: true
Size: 702 Bytes
Versions: 95
Compression:
Stored size: 702 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/events" module Renalware module Events # A wrapper around the updating of an Event to allow is to broadcast a Wisper event to anyone # configure to listen in the broadcast subscription map. class UpdateEvent include Broadcasting pattr_initialize [:event!, :params!, :by!] # Returns the boolean result of event.update_by def self.call(**args) new(**args) .broadcasting_to_configured_subscribers .call end def call event.update_by(by, params).tap do |success| broadcast(:event_updated, event) if success end end end end end
Version data entries
95 entries across 95 versions & 1 rubygems