ruby / 3.0.0 / openssl / buffering / buffer.html /

class OpenSSL::Buffering::Buffer

Parent:
String

A buffer which will retain binary encoding.

Constants

BINARY

Public Class Methods

new () Show source
# File ext/openssl/lib/openssl/buffering.rb, line 29
def initialize
  super

  force_encoding(BINARY)
end
Calls superclass method String::new

Public Instance Methods

<< (string) Show source
# File ext/openssl/lib/openssl/buffering.rb, line 35
def << string
  if string.encoding == BINARY
    super(string)
  else
    super(string.b)
  end

  return self
end
Calls superclass method String#<<
Also aliased as: concat
concat (string)
Alias for: <<

Ruby Core © 1993–2020 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.