module AsyncCable

Constants

VERSION

Public Class Methods

broadcast(data) click to toggle source

Transmit data to all WS connections. @param data [Hash]

# File lib/async_cable.rb, line 23
def broadcast(data)
  config.logger.debug { "#{name}.broadcast data=#{data.inspect}" }
  Registry.each { |conn| conn.transmit(data) }
end
config() click to toggle source

@return [Async::Config]

# File lib/async_cable.rb, line 12
def config
  @config ||= Config.new
end
configure() { |config| ... } click to toggle source

@yield [Async::Config]

# File lib/async_cable.rb, line 17
def configure
  yield config
end

Private Instance Methods

broadcast(data) click to toggle source

Transmit data to all WS connections. @param data [Hash]

# File lib/async_cable.rb, line 23
def broadcast(data)
  config.logger.debug { "#{name}.broadcast data=#{data.inspect}" }
  Registry.each { |conn| conn.transmit(data) }
end
config() click to toggle source

@return [Async::Config]

# File lib/async_cable.rb, line 12
def config
  @config ||= Config.new
end
configure() { |config| ... } click to toggle source

@yield [Async::Config]

# File lib/async_cable.rb, line 17
def configure
  yield config
end