class PubsubNotifier::Broadcasters::Base
Attributes
options[RW]
Public Class Methods
new()
click to toggle source
# File lib/pubsub_notifier/broadcasters.rb, line 6 def initialize @options = {} end
Public Instance Methods
broadcast(subscriber, publisher, event, *args)
click to toggle source
# File lib/pubsub_notifier/broadcasters.rb, line 16 def broadcast(subscriber, publisher, event, *args) raise NotImplementedError end
configure(opts = {})
click to toggle source
# File lib/pubsub_notifier/broadcasters.rb, line 10 def configure(opts = {}) self.options = default_options.merge(opts).reject { |_, v| v.nil? }.each_with_object({}) do |(key, proc_or_value), result| result[key] = proc_or_value.is_a?(Proc) ? proc_or_value.call : proc_or_value end end
Private Instance Methods
default_options()
click to toggle source
# File lib/pubsub_notifier/broadcasters.rb, line 26 def default_options {} end
logger()
click to toggle source
# File lib/pubsub_notifier/broadcasters.rb, line 22 def logger PubsubNotifier.config.logger end