Class: Iudex::HTTP::Test::TestApp::SlowGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/iudex-http-test/test_app.rb

Instance Method Summary collapse

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

#eachObject



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