Class: String

Inherits:
Object show all
Defined in:
lib/zgomot/patches/string.rb

Instance Method Summary collapse

Instance Method Details

#to_bytesObject



2
3
4
5
6
7
8
9
# File 'lib/zgomot/patches/string.rb', line 2

def to_bytes
  bytes = 0
  self.each_byte do |byte|
    bytes <<= 8
    bytes += byte
  end
  return bytes
end