class Elevate::Channel

A simple unidirectional stream of data with a single consumer.

@api private

Public Class Methods

new(block) click to toggle source
# File lib/elevate/channel.rb, line 6
def initialize(block)
  @target = block
end

Public Instance Methods

<<(obj) click to toggle source

Pushes data to consumers immediately

@return [void]

@api private

# File lib/elevate/channel.rb, line 15
def <<(obj)
  @target.call(obj)
end