Sha256: df27a0c871a939d56dd9d05a58efa9a7f72ec60c65a8d1e8e548097e819b1ac1
Contents?: true
Size: 499 Bytes
Versions: 7
Compression:
Stored size: 499 Bytes
Contents
require 'AddMappingRegistry.rb' require 'AddServant.rb' class AddPortType def initialize() @sum = 0 end def add(request) if (request.value > 100) fault = AddFault.new("Value #{request.value} is too large", "Critical") raise fault end if (request.value < 0) fault = NegativeValueFault.new("Value #{request.value} is negative", "Fatal") raise fault end @sum += request.value return AddResponse.new(@sum) end end
Version data entries
7 entries across 7 versions & 2 rubygems