Sha256: d8365ea226255dd94932799b8e2915e6d969b6196286b726994757c1670f7e8f

Contents?: true

Size: 447 Bytes

Versions: 3

Compression:

Stored size: 447 Bytes

Contents

module Cleo
  module ElementProcessor
    @queue = Cleo::ElementServer.queue
    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
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
acts_as_cleo-3.0.2 lib/generators/acts_as_cleo/install/templates/jobs/cleo_element_processor.rb
acts_as_cleo-3.0.1 lib/generators/acts_as_cleo/install/templates/jobs/cleo_element_processor.rb
acts_as_cleo-3.0.0 lib/generators/acts_as_cleo/install/templates/jobs/cleo_element_processor.rb