Method: ByteOrder.byte_order

Defined in:
lib/carat/byteorder.rb

.byte_orderObject

examines the byte order of the underlying machine



9
10
11
12
13
14
15
# File 'lib/carat/byteorder.rb', line 9

def byte_order
  if [0x12345678].pack("L") == "\x12\x34\x56\x78" 
    BigEndian
  else
    LittleEndian
  end
end