Sha256: e811dd7fb13e86171b3c0ffeb43aaa0eaa380c0024cd26c52d6ba5e221b9a27d
Contents?: true
Size: 338 Bytes
Versions: 14
Compression:
Stored size: 338 Bytes
Contents
# frozen_string_literal: true module OptParseValidator # Implementation of the Positive Integer Option class OptPositiveInteger < OptInteger # @param [ String ] value # # @return [ Integer ] def validate(value) i = super(value) raise Error, "#{i} is not > 0" unless i.positive? i end end end
Version data entries
14 entries across 14 versions & 1 rubygems