C0 code coverage information
Generated on Sat Feb 02 17:44:27 +0100 2008 with rcov 0.8.1.2
Code reported as executed by Ruby looks like this...
and this: this line is also marked as covered.
Lines considered as run by rcov, but not reported by Ruby, look like this,
and this: these lines were inferred by rcov (using simple heuristics).
Finally, here's a line marked as not executed.
1 # Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
2 # All files in this distribution are subject to the terms of the Ruby license.
3
4 require 'set'
5
6 module Ramaze
7
8 # Bundles different informer instances and sends incoming messages to each.
9 # This is the default with Informer as only member.
10
11 class LogHub
12 include Informing
13
14 attr_accessor :loggers
15 attr_accessor :ignored_tags
16
17 # Takes a list of instances or classes (which will be initialized) and that
18 # are added to @loggers. All messages are then sent to each member.
19
20 def initialize(*loggers)
21 @loggers = loggers
22 @ignored_tags = Set.new
23 @loggers.map! do |logger|
24 next(nil) if logger == self
25 logger.is_a?(Class) ? logger.new : logger
26 end
27 @loggers.uniq!
28 @loggers.compact!
29 end
30
31 # integration to Informing
32
33 def inform(tag, *args)
34 return if @ignored_tags.include?(tag)
35 @loggers.each do |logger|
36 logger.inform(tag, *args)
37 end
38 end
39 end
40 end
Generated using the rcov code coverage analysis tool for Ruby version 0.8.1.2.