module Fontina::Windows::Marshal
Constants
- BYTE
- WCHAR
Public Class Methods
new(i)
click to toggle source
Calls superclass method
# File lib/fontina/windows/marshal.rb, line 12 def initialize(i) super [i].pack('V') end
Public Instance Methods
byte(n)
click to toggle source
# File lib/fontina/windows/marshal.rb, line 24 def byte(n) n.chr BYTE end
to_i()
click to toggle source
# File lib/fontina/windows/marshal.rb, line 15 def to_i unpack('V')[0] end
wchar(n)
click to toggle source
# File lib/fontina/windows/marshal.rb, line 28 def wchar(n) n.chr WCHAR end
wstr(s)
click to toggle source
# File lib/fontina/windows/marshal.rb, line 32 def wstr(s) s.encode WCHAR unless s.nil? end
wstr!(s)
click to toggle source
# File lib/fontina/windows/marshal.rb, line 36 def wstr!(s) s.force_encoding WCHAR unless s.nil? end