class Stream
Public Class Methods
Source
# File lib/pubsubstub/stream.rb, line 2 def initialize(&callback) @callback = callback @closed = false end
Public Instance Methods
Source
# File lib/pubsubstub/stream.rb, line 17 def <<(data) @front.call(data.to_s) self end
Source
# File lib/pubsubstub/stream.rb, line 11 def each(&front) @front = front @callback.call(self) close end