Sha256: 4dd4bc890d2774cbbff19b086af78b3cfe66587b8cf35d805806c92590635288

Contents?: true

Size: 478 Bytes

Versions: 2

Compression:

Stored size: 478 Bytes

Contents

module Backgrounded
  class Proxy
    attr_reader :delegate, :options
    def initialize(delegate, options={})
      @delegate = delegate
      @options = options || {}
    end

    def method_missing(method_name, *args)
      Backgrounded.logger.debug("Requesting #{Backgrounded.handler} backgrounded method: #{method_name} for instance #{delegate} with options: #{options}")
      Backgrounded.handler.request(delegate, method_name, args, options)
      nil
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
backgrounded-2.1.2 lib/backgrounded/proxy.rb
backgrounded-2.1.1 lib/backgrounded/proxy.rb