class Beowulf::Type::Uint16
Public Class Methods
new(value)
click to toggle source
Calls superclass method
Beowulf::Type::Serializer::new
# File lib/beowulf/type/u_int16.rb, line 4 def initialize(value) super(:u_int_16, value.to_i) end
Public Instance Methods
to_bytes()
click to toggle source
# File lib/beowulf/type/u_int16.rb, line 8 def to_bytes [@value].pack('S') end
to_s()
click to toggle source
# File lib/beowulf/type/u_int16.rb, line 12 def to_s @value.to_s end