Module: AMQ::Endianness

Extended by:
Endianness
Included in:
Endianness
Defined in:
lib/amq/endianness.rb

Constant Summary collapse

BIG_ENDIAN =
([1].pack("s") == "\x00\x01")

Instance Method Summary collapse

Instance Method Details

#big_endian?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/amq/endianness.rb', line 5

def big_endian?
  BIG_ENDIAN
end

#little_endian?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/amq/endianness.rb', line 9

def little_endian?
  !BIG_ENDIAN
end