Class: SlackScratcher::Collector

Inherits:
Object
  • Object
show all
Defined in:
lib/slack_scratcher/collector.rb

Instance Method Summary collapse

Constructor Details

#initialize(loader, adapter) ⇒ Collector


3
4
5
6
# File 'lib/slack_scratcher/collector.rb', line 3

def initialize(loader, adapter)
  @loader = loader
  @adapter = adapter
end

Instance Method Details

#collect_loopObject


8
9
10
11
12
13
14
# File 'lib/slack_scratcher/collector.rb', line 8

def collect_loop
  loop do
    @loader.each(@adapter) do |data|
      @adapter.send data
    end
  end
end