class Takumi::Packet::Ushort
Public Class Methods
decode(source)
click to toggle source
# File lib/takumi/packet/ushort.rb, line 5 def decode(source) return source[0..1].unpack("n"), 2 end
new(ushort)
click to toggle source
# File lib/takumi/packet/ushort.rb, line 10 def initialize(ushort) @ushort = ushort end
Public Instance Methods
to_s()
click to toggle source
# File lib/takumi/packet/ushort.rb, line 14 def to_s [@ushort].pack("n") end