class Beefcake::Buffer
Public Class Methods
new(buf='')
click to toggle source
# File lib/riemann/babbler/monkey_patches.rb, line 4 def initialize(buf='') if buf.respond_to?(:force_encoding) self.buf = buf.force_encoding('BINARY') else self.buf = buf end end
Public Instance Methods
append_string(s)
click to toggle source
# File lib/riemann/babbler/monkey_patches.rb, line 12 def append_string(s) append_uint64(s.length) if s.respond_to?(:force_encoding) self << s.force_encoding('BINARY') else self << s end end
Also aliased as: append_bytes