Class: Reportier::Reporter
- Inherits:
-
Object
- Object
- Reportier::Reporter
- Defined in:
- lib/reportier/reporter.rb
Instance Attribute Summary collapse
-
#reporters ⇒ Object
Returns the value of attribute reporters.
Class Method Summary collapse
Instance Method Summary collapse
- #call(tracker, &blk) ⇒ Object
-
#initialize(reporters) ⇒ Reporter
constructor
A new instance of Reporter.
Constructor Details
permalink #initialize(reporters) ⇒ Reporter
Returns a new instance of Reporter.
9 10 11 |
# File 'lib/reportier/reporter.rb', line 9 def initialize(reporters) @reporters = reporters end |
Instance Attribute Details
permalink #reporters ⇒ Object
Returns the value of attribute reporters.
3 4 5 |
# File 'lib/reportier/reporter.rb', line 3 def reporters @reporters end |
Class Method Details
permalink .get ⇒ Object
[View source]
5 6 7 |
# File 'lib/reportier/reporter.rb', line 5 def self.get @current ||= new(Defaults.global.reporters) end |
Instance Method Details
permalink #call(tracker, &blk) ⇒ Object
[View source]
13 14 15 16 17 |
# File 'lib/reportier/reporter.rb', line 13 def call(tracker, &blk) @reporters.each do |reporter, v| eval "to_#{Namer.new.name(reporter)} \"#{blk.call}\"" end end |