Class: ReporterDriver
- Inherits:
-
Object
- Object
- ReporterDriver
- Defined in:
- app/core/reporter_driver.rb
Instance Method Summary collapse
-
#initialize(fetcher = ReporterFetcher.new, headline_cache = Headline) ⇒ ReporterDriver
constructor
A new instance of ReporterDriver.
- #tick ⇒ Object
Constructor Details
#initialize(fetcher = ReporterFetcher.new, headline_cache = Headline) ⇒ ReporterDriver
Returns a new instance of ReporterDriver.
23 24 25 |
# File 'app/core/reporter_driver.rb', line 23 def initialize(fetcher=ReporterFetcher.new, headline_cache=Headline) @fetcher, @headline_cache = fetcher, headline_cache end |
Instance Method Details
#tick ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'app/core/reporter_driver.rb', line 27 def tick @fetcher.active_reporters.each do |reporter| rid = @headline_cache.latest_filled_headline_rid_for(reporter.name) reporter.latest_headlines(rid).each do |hl| hl.cache end end end |