Class: Radiator::Type::Uint32
- Inherits:
-
Serializer
- Object
- Serializer
- Radiator::Type::Uint32
- Defined in:
- lib/radiator/type/u_int32.rb
Overview
Instance Method Summary collapse
-
#initialize(value) ⇒ Uint32
constructor
A new instance of Uint32.
- #to_bytes ⇒ Object
- #to_s ⇒ Object
Methods included from Utils
#debug, #error, #extract_signatures, #hexlify, #pakArr, #pakC, #pakHash, #pakI, #pakL!, #pakS, #pakStr, #pakc, #paks, #send_log, #unhexlify, #varint, #warning
Constructor Details
#initialize(value) ⇒ Uint32
Returns a new instance of Uint32.
6 7 8 |
# File 'lib/radiator/type/u_int32.rb', line 6 def initialize(value) super(:u_int_32, value.to_i) end |
Instance Method Details
#to_bytes ⇒ Object
10 11 12 |
# File 'lib/radiator/type/u_int32.rb', line 10 def to_bytes [@value].pack('L') end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/radiator/type/u_int32.rb', line 14 def to_s @value.to_s end |