class DRb::HTTP0::StrStream
Attributes
buf[R]
Public Class Methods
new(str='')
click to toggle source
# File lib/drb/http0.rb, line 10 def initialize(str='') @buf = str end
Public Instance Methods
read(n)
click to toggle source
# File lib/drb/http0.rb, line 15 def read(n) begin return @buf[0,n] ensure @buf[0,n] = '' end end
write(s)
click to toggle source
# File lib/drb/http0.rb, line 23 def write(s) @buf.concat s end