Class: PacketGen::Types::Int32Enum
- Defined in:
- lib/packetgen/types/enum.rb
Overview
Enumeration on 4-byte integer. See Enum.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Enum
Attributes inherited from Int
#default, #endian, #value, #width
Instance Method Summary collapse
-
#initialize(enum, endian = :big, default = nil) ⇒ Int32Enum
constructor
A new instance of Int32Enum.
Methods inherited from Enum
#format_inspect, #to_human, #value=
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(enum, endian = :big, default = nil) ⇒ Int32Enum
Returns a new instance of Int32Enum.
139 140 141 142 |
# File 'lib/packetgen/types/enum.rb', line 139 def initialize(enum, endian=:big, default=nil) super(enum, endian, 4, default) @packstr = { big: 'N', little: 'V' } end |