class EventMachine::Zipper::StreamIO

Public Class Methods

new(&block) click to toggle source
# File lib/em-zipper/stream_io.rb, line 8
def initialize(&block)
  @block = block
  @pos   = 0
end

Public Instance Methods

<<(x) click to toggle source
# File lib/em-zipper/stream_io.rb, line 22
def <<(x)
  @block.call(x.to_s)
  @pos += x.to_s.bytesize
end
each(&block) click to toggle source
# File lib/em-zipper/stream_io.rb, line 27
def each(&block)
  @block = block
end
pos() click to toggle source
# File lib/em-zipper/stream_io.rb, line 17
def pos
  @pos
end
tell() click to toggle source
# File lib/em-zipper/stream_io.rb, line 13
def tell
  @pos
end