class Eggshell::Stream::IOWrapper
Public Class Methods
new(stream)
click to toggle source
# File lib/eggshell/stream.rb, line 18 def initialize(stream) @stream = stream @buff = [] end
Public Instance Methods
<<(str)
click to toggle source
# File lib/eggshell/stream.rb, line 23 def <<(str) @buff << str end
[](index)
click to toggle source
# File lib/eggshell/stream.rb, line 35 def [](index) @buff[index] end
flush()
click to toggle source
# File lib/eggshell/stream.rb, line 39 def flush @stream.write(@buff.join("\n")) end
join(str)
click to toggle source
# File lib/eggshell/stream.rb, line 31 def join(str) @buff.join(str) end
write(str)
click to toggle source
# File lib/eggshell/stream.rb, line 27 def write(str) @stream.write(str) end