Sha256: 1690a95603f4815345b93e9475791e397667953f14b2d69c3a2534d4c3dda339
Contents?: true
Size: 522 Bytes
Versions: 5
Compression:
Stored size: 522 Bytes
Contents
# encoding: ASCII-8BIT 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
5 entries across 5 versions & 1 rubygems