Sha256: 14b1f46d0affbec75719b31ca9968ad71ac3874a23c72b0bbf2d2b0a52b2e760

Contents?: true

Size: 460 Bytes

Versions: 5

Compression:

Stored size: 460 Bytes

Contents

module PipeRpc
  class Client::Request::Result
    def initialize(request)
      @request = request
    end

    def value=(result)
      @received = true
      @value = result
    end

    def received?
      @received
    end

    def value
      if @value.is_a? Exception
        @value.set_backtrace(@value.backtrace.to_a + @request.stacktrace) if @value.respond_to? :set_backtrace
        raise @value
      else
        @value
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pipe_rpc-2.0.0 lib/pipe_rpc/client_request_result.rb
pipe_rpc-1.1.2 lib/pipe_rpc/client_request_result.rb
pipe_rpc-1.1.1 lib/pipe_rpc/client_request_result.rb
pipe_rpc-1.1.0 lib/pipe_rpc/client_request_result.rb
pipe_rpc-1.0.0 lib/pipe_rpc/client_request_result.rb