Method: ConfCtl::LineBuffer#flush
- Defined in:
- lib/confctl/line_buffer.rb
#flush ⇒ String
Return the buffer’s contents and flush it
If block was given to ConfCtl::LineBuffer, it will be invoked with the buffer contents.
42 43 44 45 46 47 |
# File 'lib/confctl/line_buffer.rb', line 42 def flush ret = buffer.clone buffer.clear block.call(ret) if block ret end |