Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- src/connection_base.rb
Instance Method Summary collapse
Instance Method Details
#binary ⇒ Object
12 |
# File 'src/connection_base.rb', line 12 def binary = encode(Encoding::ASCII_8BIT) |
#cp866_utf8 ⇒ Object
10 |
# File 'src/connection_base.rb', line 10 def cp866_utf8 = force_encoding(Encoding::CP866).encode(Encoding::UTF_8) |
#force_binary ⇒ Object
13 |
# File 'src/connection_base.rb', line 13 def force_binary = dup.force_encoding(Encoding::ASCII_8BIT) |
#hex_str ⇒ Object
14 |
# File 'src/connection_base.rb', line 14 def hex_str = force_binary.bytes.map { '%02X' % _1 }.join(' ') |
#utf8_cp866 ⇒ Object
11 |
# File 'src/connection_base.rb', line 11 def utf8_cp866 = encode(Encoding::CP866) |