# File lib/byteorder.rb, line 21 def big_endian? byte_order == BigEndian end
examines the byte order of the underlying machine
# File lib/byteorder.rb, line 7 def byte_order if [0x12345678].pack("L") == "\x12\x34\x56\x78" BigEndian else LittleEndian end end
# File lib/byteorder.rb, line 17 def little_endian? byte_order == LittleEndian end
Generated with the Darkfish Rdoc Generator 2.