Module: Net::SSH::Test::Extensions::IO
- Defined in:
- lib/net/ssh/test/extensions.rb
Overview
An extension to the built-in ::IO class. Simply redefines IO.select so that it can be scripted in Net::SSH unit tests.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
- .extension_enabled? ⇒ Boolean
-
.included(base) ⇒ Object
:nodoc:.
- .with_test_extension(&block) ⇒ Object
Class Method Details
.extension_enabled? ⇒ Boolean
128 129 130 |
# File 'lib/net/ssh/test/extensions.rb', line 128 def self.extension_enabled? @extension_enabled end |
.included(base) ⇒ Object
:nodoc:
112 113 114 |
# File 'lib/net/ssh/test/extensions.rb', line 112 def self.included(base) #:nodoc: base.extend(ClassMethods) end |
.with_test_extension(&block) ⇒ Object
118 119 120 121 122 123 124 125 126 |
# File 'lib/net/ssh/test/extensions.rb', line 118 def self.with_test_extension(&block) orig_value = @extension_enabled @extension_enabled = true begin yield ensure @extension_enabled = orig_value end end |