Skip to content

Commit e4679b0

Browse files
committed
Document interface requirements.
1 parent 27e4aba commit e4679b0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/io/stream/readable.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ module IO::Stream
2222
MAXIMUM_READ_SIZE = ENV.fetch("IO_STREAM_MAXIMUM_READ_SIZE", MINIMUM_READ_SIZE * 64).to_i
2323

2424
# A module providing readable stream functionality.
25+
#
26+
# You must implement the `sysread` method to read data from the underlying IO.
2527
module Readable
2628
def initialize(minimum_read_size: MINIMUM_READ_SIZE, maximum_read_size: MAXIMUM_READ_SIZE, block_size: nil, **, &block)
2729
@done = false

lib/io/stream/writable.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ module IO::Stream
1010
MINIMUM_WRITE_SIZE = ENV.fetch("IO_STREAM_MINIMUM_WRITE_SIZE", BLOCK_SIZE).to_i
1111

1212
# A module providing writable stream functionality.
13+
#
14+
# You must implement the `syswrite` method to write data to the underlying IO.
1315
module Writable
1416
def initialize(minimum_write_size: MINIMUM_WRITE_SIZE, **, &block)
1517
@writing = ::Thread::Mutex.new

0 commit comments

Comments
 (0)