Class: PacketGen::Types::SInt8

Inherits:
Int
  • Object
show all
Defined in:
lib/packetgen/types/int.rb

Overview

One byte signed integer

Author:

  • Sylvain Daubert

Since:

  • 2.8.2

Instance Attribute Summary

Attributes inherited from Int

#default, #endian, #value, #width

Instance Method Summary collapse

Methods inherited from Int

#read, #sz, #to_f, #to_i, #to_s

Constructor Details

#initialize(value = nil) ⇒ SInt8

Returns a new instance of SInt8.

Parameters:

  • value (Integer, nil) (defaults to: nil)

Since:

  • 2.8.2



102
103
104
105
# File 'lib/packetgen/types/int.rb', line 102

def initialize(value=nil)
  super(value, nil, 1)
  @packstr = { nil => 'c' }
end