Class: Iudex::HTTP::Test::TestApp::SlowGenerator
- Inherits:
-
Object
- Object
- Iudex::HTTP::Test::TestApp::SlowGenerator
- Defined in:
- lib/iudex-http-test/test_app.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(out) ⇒ SlowGenerator
constructor
A new instance of SlowGenerator.
Constructor Details
#initialize(out) ⇒ SlowGenerator
Returns a new instance of SlowGenerator.
181 182 183 |
# File 'lib/iudex-http-test/test_app.rb', line 181 def initialize( out ) @out = out end |
Instance Method Details
#each ⇒ Object
185 186 187 188 189 190 191 192 193 |
# File 'lib/iudex-http-test/test_app.rb', line 185 def each count = 0 loop do count += 1 yield "Line number #{count}\n" @out.flush sleep 0.100 end end |