Class: IronChef::Writer::Batched

Inherits:
Object
  • Object
show all
Defined in:
lib/iron_chef/writer/batched.rb

Instance Method Summary collapse

Constructor Details

#initialize(logger) ⇒ Batched

Returns a new instance of Batched.



4
5
6
7
# File 'lib/iron_chef/writer/batched.rb', line 4

def initialize(logger)
  @outputs = {}
  @logger = logger
end

Instance Method Details

#all_output_collectedObject



14
15
16
17
18
19
# File 'lib/iron_chef/writer/batched.rb', line 14

def all_output_collected
  @outputs.keys.sort.each do |host|
    @logger.info "Chef output for #{host}"
    @logger.debug @outputs[host], host
  end
end

#collect_output(host, data) ⇒ Object



9
10
11
12
# File 'lib/iron_chef/writer/batched.rb', line 9

def collect_output(host, data)
  @outputs[host] ||= ""
  @outputs[host] << data
end