Sha256: 64c2e49ab2cebc71f8f97af8de26620dc6ab37f279b06dd1263f513b65de734a

Contents?: true

Size: 229 Bytes

Versions: 3

Compression:

Stored size: 229 Bytes

Contents

class Cronicle::LogSniffer
  def initialize(original_output, &block)
    @original_output = original_output
    @block = block
  end

  def write(obj)
    @block.call(obj)
    @original_output << obj
  end
  alias :<< :write
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cronicle-0.2.5 lib/cronicle/log_sniffer.rb
cronicle-0.2.4 lib/cronicle/log_sniffer.rb
cronicle-0.2.3 lib/cronicle/log_sniffer.rb