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.



185
186
187
# File 'lib/iudex-http-test/test_app.rb', line 185

def initialize( out )
  @out = out
end

Instance Method Details

#eachObject



189
190
191
192
193
194
195
196
197
# File 'lib/iudex-http-test/test_app.rb', line 189

def each
  count = 0
  loop do
    count += 1
    yield "Line number #{count}\n"
    @out.flush
    sleep 0.100
  end
end