class StructFu::Int8

Int8 is a one byte value.

Public Class Methods

new(v=nil) click to toggle source
Calls superclass method StructFu::Int.new
# File lib/packetfu/structfu.rb, line 98
def initialize(v=nil)
        super(v,nil,w=1)
        @packstr = "C"
end

Public Instance Methods

to_s() click to toggle source

Returns a one byte value as a packed string.

# File lib/packetfu/structfu.rb, line 104
def to_s
 [(self.v || self.d)].pack("C")
end