Method: BERT::Encode.encode
- Defined in:
- lib/bert/encode.rb
.encode(data) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/bert/encode.rb', line 11 def self.encode(data) io = StringIO.new io.set_encoding('binary') if io.respond_to?(:set_encoding) self.new(io).write_any(data) io.string end |