Module: Bane::Behaviors::ForEachLine

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, options)
  while (io.gets)
    super(io, options)
  end
end