Class: DripperJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
lib/dripper/dripper_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(obj) ⇒ Object



4
5
6
7
8
9
# File 'lib/dripper/dripper_job.rb', line 4

def perform(obj)
  # find any drippers for this class and try to execute them
  Dripper.registry.select{|r| r.model == obj.class.table_name.underscore.to_sym}.each do |r|
    r.execute obj
  end
end