Class: QuartzTorrent::WriteOnlyIoFacade
- Defined in:
- lib/quartz_torrent/reactor.rb
Overview
An IoFacade that doesn’t allow reading. This is not part of the public API.
Instance Attribute Summary
Attributes inherited from IoFacade
Instance Method Summary collapse
-
#initialize(ioInfo, logger = nil, readError = "Reading is not allowed for this IO") ⇒ WriteOnlyIoFacade
constructor
Create a new WriteOnlyIoFacade that delegates to the passed IOInfo object.
-
#read(length) ⇒ Object
Raise an exception.
Methods inherited from IoFacade
#close, #closed?, #flush, #readRateLimit=, #removeFromIOHash, #seek, #write, #writeRateLimit=
Constructor Details
#initialize(ioInfo, logger = nil, readError = "Reading is not allowed for this IO") ⇒ WriteOnlyIoFacade
Create a new WriteOnlyIoFacade that delegates to the passed IOInfo object.
319 320 321 322 |
# File 'lib/quartz_torrent/reactor.rb', line 319 def initialize(ioInfo, logger = nil, readError = "Reading is not allowed for this IO") super(ioInfo, logger) @readError = readError end |
Instance Method Details
#read(length) ⇒ Object
Raise an exception.
325 326 327 |
# File 'lib/quartz_torrent/reactor.rb', line 325 def read(length) raise @readError end |