From 8432a5c669f12c1965a0593b4ff22f9dbbc38a2f Mon Sep 17 00:00:00 2001 From: John Bintz Date: Tue, 10 Apr 2012 09:58:39 -0400 Subject: [PATCH] fix logging, oops --- lib/flowerbox/reporter_list.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/flowerbox/reporter_list.rb b/lib/flowerbox/reporter_list.rb index 4b081cc..7f699c1 100644 --- a/lib/flowerbox/reporter_list.rb +++ b/lib/flowerbox/reporter_list.rb @@ -30,7 +30,16 @@ module Flowerbox end def start(message) - @reporters.each { |reporter| reporter.start(message) } + on_each_reporter(:start, message) + end + + def log(message) + on_each_reporter(:log, message) + end + + private + def on_each_reporter(method, message) + @reporters.each { |reporter| reporter.send(method, message) } end end end