class Rubybear::Type::Uint16
See: github.com/xeroc/piston-lib/blob/34a7525cee119ec9b24a99577ede2d54466fca0e/bearsbase/operations.py
Public Class Methods
new(value)
click to toggle source
Calls superclass method
Rubybear::Type::Serializer::new
# File lib/rubybear/type/u_int16.rb, line 6 def initialize(value) super(:u_int_16, value.to_i) end
Public Instance Methods
to_bytes()
click to toggle source
# File lib/rubybear/type/u_int16.rb, line 10 def to_bytes [@value].pack('S') end
to_s()
click to toggle source
# File lib/rubybear/type/u_int16.rb, line 14 def to_s @value.to_s end