module XDR::Hyper
Public Class Methods
read(io)
click to toggle source
# File lib/xdr/hyper.rb, line 11 def self.read(io) read_bytes(io, 8).unpack("q>").first end
write(val, io)
click to toggle source
# File lib/xdr/hyper.rb, line 5 def self.write(val, io) raise XDR::WriteError, "val is not Integer" unless val.is_a?(Integer) # TODO: check bounds io.write [val].pack("q>") end