Module: Base64dumper
- Included in:
- SWin::Bitmap
- Defined in:
- lib/vr/rscutil.rb
Overview
rscutil.rb
Utilities for resources
Base64dumper
The module to use binary data with base64
Class Method
— loadString(str)
Load a object from base64 encoded string.
Method
— dumpString
Dumps an object into base64 encoded string.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.loadString(str) ⇒ Object
32 33 34 |
# File 'lib/vr/rscutil.rb', line 32 def self.loadString(str) Marshal.load(str.unpack("m")[0]) end |
Instance Method Details
#dumpString ⇒ Object
36 37 38 |
# File 'lib/vr/rscutil.rb', line 36 def dumpString [Marshal.dump(self)].pack("m") end |