Method: ByteOrder.byte_order

Defined in:
lib/mega/byteorder.rb

.byte_orderObject

examines the byte order of the underlying machine



40
41
42
43
44
45
46
# File 'lib/mega/byteorder.rb', line 40

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