Sha256: 3615ba8b4185fff7b308a9188e8a081eb05cf9eaa3f4c0456c0d081ab67e14c1

Contents?: true

Size: 463 Bytes

Versions: 3

Compression:

Stored size: 463 Bytes

Contents

module Cleo
  module ConnectionProcessor
    @queue = Cleo::ConnectionServer.queue
    def self.perform(operation, klass, klass_id)
      on_me = Kernel.const_get(klass).find(klass_id)

      case operation.downcase
      when "create"
        Cleo::ConnectionServer.execute_create(on_me)
      when "update"
        Cleo::ConnectionServer.execute_update(on_me)
      when "delete"
        Cleo::ConnectionServer.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_connection_processor.rb
acts_as_cleo-3.0.1 lib/generators/acts_as_cleo/install/templates/jobs/cleo_connection_processor.rb
acts_as_cleo-3.0.0 lib/generators/acts_as_cleo/install/templates/jobs/cleo_connection_processor.rb