Class: PacketGen::Types::Int8
Overview
One byte unsigned integer
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Int
#default, #endian, #value, #width
Instance Method Summary collapse
-
#initialize(value = nil) ⇒ Int8
constructor
A new instance of Int8.
Methods inherited from Int
#format_inspect, #nbits, #read, #sz, #to_f, #to_i, #to_s
Methods included from Fieldable
#format_inspect, #read, #sz, #to_human, #to_s, #type_name
Constructor Details
#initialize(value = nil) ⇒ Int8
Returns a new instance of Int8.
113 114 115 116 |
# File 'lib/packetgen/types/int.rb', line 113 def initialize(value=nil) super(value, nil, 1) @packstr = { nil => 'C' } end |