class Ronin::Support::Binary::CTypes::IntType

Base class for all signed integer types.

Public Class Methods

new(**kwargs) click to toggle source

Initializes the integer type.

@param [Hash{Symbol => Object}] kwargs

Additional keyword arguments for {Type#initialize}.

@option kwargs [Integer] :size

The size in bytes of the type.

@option kwargs [:little, :big, nil] :endian

The endian-ness of the integer type.

@option kwargs [String] :pack_string

The String for `Array#pack` or `String#unpack`.
Calls superclass method
# File lib/ronin/support/binary/ctypes/int_type.rb, line 45
def initialize(**kwargs)
  super(signed: true, **kwargs)
end

Public Instance Methods

uninitialized_value() click to toggle source

Returns an uninitialized signed integer value.

@return [0]

# File lib/ronin/support/binary/ctypes/int_type.rb, line 54
def uninitialized_value
  0
end