Sha256: 0a48c8868d2f7ece2eb529668ca6ce2d83a5e753a5911b0e2a29125d5490d2fd

Contents?: true

Size: 462 Bytes

Versions: 8

Compression:

Stored size: 462 Bytes

Contents

# frozen_string_literal: true
class Ultravisor::Child::Call
  attr_reader :method_name

  def initialize(method_name, args, blk, rv_q, rv_fail)
    @method_name, @args, @blk, @rv_q, @rv_fail = method_name, args, blk, rv_q, rv_fail
  end

  def go!(receiver)
    @rv_q << receiver.__send__(@method_name, *@args, &@blk)
  rescue Exception => ex
    @rv_q << @rv_fail
    raise
  ensure
    @rv_q.close
  end

  def child_restarted!
    @rv_q << @rv_fail
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
service_skeleton-2.2.0 ultravisor/lib/ultravisor/child/call.rb
service_skeleton-2.1.0 ultravisor/lib/ultravisor/child/call.rb
service_skeleton-1.0.5 ultravisor/lib/ultravisor/child/call.rb
service_skeleton-2.0.2 ultravisor/lib/ultravisor/child/call.rb
service_skeleton-2.0.1 ultravisor/lib/ultravisor/child/call.rb
service_skeleton-2.0.0 ultravisor/lib/ultravisor/child/call.rb
service_skeleton-1.0.4 ultravisor/lib/ultravisor/child/call.rb
service_skeleton-0.0.0.1.ENOTAG ultravisor/lib/ultravisor/child/call.rb