Class: Steam::ByteWriter::Int64Type
- Inherits:
-
Object
- Object
- Steam::ByteWriter::Int64Type
- Defined in:
- lib/steam/byte_writer.rb
Overview
Wrap an Int64 allowing the lo and hi 32 bits to be extracted
Instance Method Summary collapse
-
#hi ⇒ Integer
The high 32 bits.
-
#initialize(value) ⇒ Int64Type
constructor
Create an Int64Type instance.
-
#int32s ⇒ Integer
An array of the low and high bits.
-
#lo ⇒ Integer
The low 32 bits.
Constructor Details
#initialize(value) ⇒ Int64Type
Create an Int64Type instance
15 16 17 |
# File 'lib/steam/byte_writer.rb', line 15 def initialize(value) @value = value end |
Instance Method Details
#hi ⇒ Integer
The high 32 bits
29 30 31 |
# File 'lib/steam/byte_writer.rb', line 29 def hi (@value >> 32) & 0xFFFFFFFF end |
#int32s ⇒ Integer
An array of the low and high bits
36 37 38 |
# File 'lib/steam/byte_writer.rb', line 36 def int32s [lo, hi] end |
#lo ⇒ Integer
The low 32 bits
22 23 24 |
# File 'lib/steam/byte_writer.rb', line 22 def lo @value & 0xFFFFFFFF end |