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
131 132 133 |
# File 'lib/net/ssh/test/extensions.rb', line 131 def self.extension_enabled? @extension_enabled end |
.included(base) ⇒ Object
:nodoc:
115 116 117 |
# File 'lib/net/ssh/test/extensions.rb', line 115 def self.included(base) # :nodoc: base.extend(ClassMethods) end |
.with_test_extension(&block) ⇒ Object
121 122 123 124 125 126 127 128 129 |
# File 'lib/net/ssh/test/extensions.rb', line 121 def self.with_test_extension(&block) orig_value = @extension_enabled @extension_enabled = true begin yield ensure @extension_enabled = orig_value end end |