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.

Constant Summary

Class Method Summary

Instance Method Summary

Constructor Details

.newBuffer

[ GitHub ]

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

def initialize
  super

  force_encoding(BINARY)
end

Instance Method Details

#<<(string) Also known as: #concat

[ GitHub ]

  
# 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

#concat(string)

Alias for #<<.

[ GitHub ]

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

alias concat <<