Module Net::SSH::Test::Extensions::BufferedIo

  1. lib/net/ssh/test/extensions.rb

An extension to Net::SSH::BufferedIo (assumes that the underlying IO is actually a StringIO). Facilitates unit testing.

Methods

public instance

  1. select_for_read?

External Aliases

select_for_write -> select_for_write?
select_for_error -> select_for_error?

Attributes

select_for_error [RW] Set this to true if you want the IO to pretend to be in an error state
select_for_write [RW] Set this to true if you want the IO to pretend to be available for writing

Public instance methods

select_for_read? ()

Returns true if the position in the stream is less than the total length of the stream.

[show source]
    # File lib/net/ssh/test/extensions.rb, line 22
22:       def select_for_read?
23:         pos < size
24:       end