module PipeRpc class Hub::Request::Result def initialize(request, result) @request, @result = request, result end def value @request.hub.transport_mapper.to_transport @result end def to_response ResultResponse.new(id: @request.id, result: value) end end end