Method: ByteOrder.byteorder

Defined in:
lib/mega/byteorder.rb

.byteorderObject

examines the byte order of the underlying machine



48
49
50
51
52
53
54
# File 'lib/mega/byteorder.rb', line 48

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