Class: DaimonSkycrawlers::Processor::Base

Inherits:
Object
  • Object
show all
Includes:
Callbacks, ConfigMixin, Configurable, LoggerMixin
Defined in:
lib/daimon_skycrawlers/processor/base.rb

Direct Known Subclasses

Default, Proc, Spider

Instance Method Summary collapse

Methods included from Configurable

#configure

Methods included from Callbacks

#before_process, #clear_before_process_callbacks, #initialize, #run_before_callbacks

Methods included from ConfigMixin

#initialize

Methods included from LoggerMixin

included, #initialize

Instance Method Details

#call(message) ⇒ Object



20
21
22
# File 'lib/daimon_skycrawlers/processor/base.rb', line 20

def call(message)
  raise "Implement this method in subclass"
end

#process(message) ⇒ Object



14
15
16
17
18
# File 'lib/daimon_skycrawlers/processor/base.rb', line 14

def process(message)
  proceeding = run_before_callbacks(message)
  return unless proceeding
  call(message)
end

#storageObject



24
25
26
# File 'lib/daimon_skycrawlers/processor/base.rb', line 24

def storage
  @storage ||= DaimonSkycrawlers::Storage::RDB.new
end