Module: Bane::Behaviors::Responders::ForEachLine

Included in:
DelugeResponseForEachLine, FixedResponseForEachLine, NewlineResponseForEachLine, RandomResponseForEachLine, SlowResponseForEachLine
Defined in:
lib/bane/behaviors/responders/for_each_line.rb

Overview

This module can be used to wrap another behavior with a “while(io.gets)” loop, which reads a line from the input and then performs the given behavior.

Instance Method Summary collapse

Instance Method Details

#serve(io) ⇒ Object



11
12
13
14
15
# File 'lib/bane/behaviors/responders/for_each_line.rb', line 11

def serve(io)
  while (io.gets)
    super(io)
  end
end