Class: String

Inherits:
Object
  • Object
show all
Defined in:
src/connection_base.rb

Instance Method Summary collapse

Instance Method Details

#binaryObject



12
# File 'src/connection_base.rb', line 12

def binary = encode(Encoding::ASCII_8BIT)

#cp866_utf8Object



10
# File 'src/connection_base.rb', line 10

def cp866_utf8 = force_encoding(Encoding::CP866).encode(Encoding::UTF_8)

#force_binaryObject



13
# File 'src/connection_base.rb', line 13

def force_binary = dup.force_encoding(Encoding::ASCII_8BIT)

#hex_strObject



14
# File 'src/connection_base.rb', line 14

def hex_str = force_binary.bytes.map { '%02X' % _1 }.join(' ')

#utf8_cp866Object



11
# File 'src/connection_base.rb', line 11

def utf8_cp866 = encode(Encoding::CP866)