Module: Cleo::ElementProcessor
- Defined in:
- lib/generators/acts_as_cleo/install/templates/jobs/cleo_element_processor.rb
Class Method Summary collapse
Class Method Details
.perform(operation, klass, klass_id) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/acts_as_cleo/install/templates/jobs/cleo_element_processor.rb', line 4 def self.perform(operation, klass, klass_id) on_me = Kernel.const_get(klass).find(klass_id) case operation.downcase when "create" Cleo::ElementServer.execute_create(on_me) when "update" Cleo::ElementServer.execute_update(on_me) when "delete" Cleo::ElementServer.execute_delete(on_me) end end |