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