123456789_123456789_123456789_123456789_123456789_

Class: OpenSSL::Buffering::Buffer

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, String
Instance Chain:
self, String
Inherits: String
  • ::Object
Defined in: ext/openssl/lib/openssl/buffering.rb

Overview

A buffer which will retain binary encoding.

Instance Method Summary

Instance Method Details

#_append

[ GitHub ]

  
# File 'ext/openssl/lib/openssl/buffering.rb', line 28

alias_method :_append, :<<

#append_as_bytes(string)

[ GitHub ]

  
# File 'ext/openssl/lib/openssl/buffering.rb', line 29

def append_as_bytes(string)
  if string.encoding == Encoding::BINARY
    _append(string)
  else
    _append(string.b)
  end

  self
end