Method: MessageBus::Implementation#allow_broadcast?

Defined in:
lib/message_bus.rb

#allow_broadcast?Boolean

Returns whether or not broadcasting is allowed. If not explicitly set, defaults to false unless we’re in Rails test or development mode.

Returns:

  • (Boolean)

    whether or not broadcasting is allowed. If not explicitly set, defaults to false unless we’re in Rails test or development mode.



267
268
269
270
271
272
273
274
# File 'lib/message_bus.rb', line 267

def allow_broadcast?
  @config[:allow_broadcast] ||=
    if defined? ::Rails.env
      ::Rails.env.test? || ::Rails.env.development?
    else
      false
    end
end