Class: Console::Mux::BufferOutputter
- Defined in:
- lib/console/mux/buffer_outputter.rb
Overview
A Log4r outputtter that captures a rolling buffer of logged messages.
Instance Method Summary collapse
- 
  
    
      #each(*args, &block)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Iterate through each captured log line. 
- 
  
    
      #initialize(_name, size, hash = {})  ⇒ BufferOutputter 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of BufferOutputter. 
Constructor Details
#initialize(_name, size, hash = {}) ⇒ BufferOutputter
Returns a new instance of BufferOutputter.
| 34 35 36 37 | # File 'lib/console/mux/buffer_outputter.rb', line 34 def initialize(_name, size, hash={}) @buffer = RollingArray.new(size) super(_name, hash) end | 
Instance Method Details
#each(*args, &block) ⇒ Object
Iterate through each captured log line.
| 40 41 42 | # File 'lib/console/mux/buffer_outputter.rb', line 40 def each(*args, &block) @buffer.each(*args, &block) end |