Class: HeimdallProxyWorker

Inherits:
Heimdall::Worker show all
Defined in:
lib/heimdall/heimdall_proxy.rb

Instance Method Summary collapse

Methods inherited from Heimdall::Worker

call, #initialize, #log

Constructor Details

This class inherits a constructor from Heimdall::Worker

Instance Method Details

#call(opts) ⇒ Object



35
36
37
38
39
40
41
42
# File 'lib/heimdall/heimdall_proxy.rb', line 35

def call opts
  object, name, args = Marshal.load Base64.decode64 opts[:b64]
  response = object.send name, *args

  if [Integer, Symbol, String].include?(response.class)
    log(response.to_s).to_s[0, 1_000]
  end
end