Class: Ronin::Support::Binary::CTypes::Int16Type

Inherits:
IntType show all
Defined in:
lib/ronin/support/binary/ctypes/int16_type.rb

Overview

Base class for all Int16 types.

Instance Attribute Summary

Attributes inherited from ScalarType

#alignment, #endian, #signed, #size

Attributes inherited from Type

#pack_string

Instance Method Summary collapse

Methods inherited from IntType

#uninitialized_value

Methods inherited from ScalarType

#align, #dequeue_value, #enqueue_value, #pack, #signed?, #unpack, #unsigned?

Methods inherited from Type

#[], #align, #alignment, #dequeue_value, #enqueue_value, #pack, #size, #uninitialized_value, #unpack

Constructor Details

#initialize(**kwargs) ⇒ Int16Type

Initializes the Int16 type.

Parameters:

  • kwargs (Hash{Symbol => Object})

    Additional keyword arguments for Type#initialize.

Options Hash (**kwargs):

  • :endian (:little, :big, nil)

    The endian-ness of the integer type.

  • :pack_string (String)

    The String for Array#pack or String#unpack.



42
43
44
# File 'lib/ronin/support/binary/ctypes/int16_type.rb', line 42

def initialize(**kwargs)
  super(signed: true, size: 2, **kwargs)
end