class Puma::IOBuffer
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/puma/io_buffer.rb, line 7 def initialize super.binmode end
Public Instance Methods
append(*strs)
click to toggle source
# File lib/puma/io_buffer.rb, line 41 def append(*strs) strs.each { |str| write str } end
empty?()
click to toggle source
# File lib/puma/io_buffer.rb, line 11 def empty? length.zero? end
read_and_reset()
click to toggle source
Read & Reset - returns contents and resets @return [String] StringIO contents
# File lib/puma/io_buffer.rb, line 27 def read_and_reset rewind str = read truncate 0 rewind str end
reset()
click to toggle source
# File lib/puma/io_buffer.rb, line 15 def reset truncate 0 rewind end
Also aliased as: clear
to_s()
click to toggle source
# File lib/puma/io_buffer.rb, line 20 def to_s rewind read end