class SupplyDrop::Writer::Batched

Public Class Methods

new(logger) click to toggle source
# File lib/supply_drop/writer/batched.rb, line 4
def initialize(logger)
  @outputs = {}
  @logger = logger
end

Public Instance Methods

all_output_collected() click to toggle source
# File lib/supply_drop/writer/batched.rb, line 14
def all_output_collected
  @outputs.keys.sort.each do |host|
    @logger.info "Puppet output for #{host}"
    @logger.debug @outputs[host], host
  end
end
collect_output(host, data) click to toggle source
# File lib/supply_drop/writer/batched.rb, line 9
def collect_output(host, data)
  @outputs[host] ||= ""
  @outputs[host] << data
end