Class: String
Instance Method Summary collapse
Instance Method Details
#to_bytes ⇒ Object
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 |