Sha256: bd1bfab604f926847070c9c2be31200cc5b7a78c7a90c18b2a52baf57ed68b66

Contents?: true

Size: 501 Bytes

Versions: 4

Compression:

Stored size: 501 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
        DeepMapper.from_transport(@value, @request.hub)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pipe_rpc-2.2.3 lib/pipe_rpc/client_request_result.rb
pipe_rpc-2.2.2 lib/pipe_rpc/client_request_result.rb
pipe_rpc-2.2.1 lib/pipe_rpc/client_request_result.rb
pipe_rpc-2.2.0 lib/pipe_rpc/client_request_result.rb