module XDR::Concerns::ReadsBytes

Private Instance Methods

read_bytes(io, length) click to toggle source
# File lib/xdr/concerns/reads_bytes.rb, line 3
def read_bytes(io, length)
  io.read(length).tap do |bytes|
    raise EOFError if bytes.nil? || bytes.length != length
  end
end