Module: XDR::Hyper
- Extended by:
- Concerns::ConvertsToXDR, Concerns::IntegerConverter
- Defined in:
- lib/xdr/hyper.rb
Class Method Summary collapse
Methods included from Concerns::ConvertsToXDR
from_xdr, read, to_xdr, valid?, write
Methods included from Concerns::IntegerConverter
Class Method Details
.read(io) ⇒ Object
11 12 13 |
# File 'lib/xdr/hyper.rb', line 11 def self.read(io) read_bytes(io, 8).unpack1("q>") end |
.write(val, io) ⇒ Object
5 6 7 8 9 |
# 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 |