Exception: TruncatedDataError

Inherits:
IOError
  • Object
show all
Defined in:
lib/readbytes.rb

Overview

TruncatedDataError is raised when IO#readbytes fails to read enough data.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mesg, data) ⇒ TruncatedDataError

:nodoc:



4
5
6
7
# File 'lib/readbytes.rb', line 4

def initialize(mesg, data) # :nodoc:
  @data = data
  super(mesg)
end

Instance Attribute Details

#dataObject (readonly)

The read portion of an IO#readbytes attempt.



10
11
12
# File 'lib/readbytes.rb', line 10

def data
  @data
end