class OptParseValidator::OptInteger
Implementation of the Integer Option
Public Instance Methods
Source
# File lib/opt_parse_validator/opts/integer.rb, line 9 def validate(value) raise Error, "#{value} is not an integer" if value.to_i.to_s != value value.to_i end
@param [ String ] value
@return [ Integer ]