Sha256: c94d556d1587a569d990e6a1aa360410e4cb1203d6e4bfcd89fec213b32b7ae1
Contents?: true
Size: 306 Bytes
Versions: 7
Compression:
Stored size: 306 Bytes
Contents
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
7 entries across 7 versions & 1 rubygems