Sha256: 29b0daabe752d2c7fe82b7d110c88661b2aec353e4fc1dfc76ced046fddba3aa

Contents?: true

Size: 429 Bytes

Versions: 1

Compression:

Stored size: 429 Bytes

Contents

class Backgrounded::Handler::WorklingHandler < Workling::Base
  def request(object, method, *args)
    options = {
      :class => object.class.name,
      :id => object.id,
      :method => method,
      :params => args
    }
    Backgrounded::Handler::WorklingHandler.async_perform options
  end
  def perform(options = {})
    options[:class].constantize.find(options[:id]).send(options[:method], *options[:params])
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
backgrounded-0.6.0 lib/backgrounded/handler/workling_handler.rb