Module: Bane::Behaviors::ForEachLine
- Included in:
- DelugeResponseForEachLine, FixedResponseForEachLine, NewlineResponseForEachLine, RandomResponseForEachLine, SlowResponseForEachLine
- Defined in:
- lib/bane/behaviors.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, options) ⇒ Object
19 20 21 22 23 |
# File 'lib/bane/behaviors.rb', line 19 def serve(io, ) while (io.gets) super(io, ) end end |