Method: Axlsx.validate_unsigned_int

Defined in:
lib/axlsx/util/validators.rb

.validate_unsigned_int(v) ⇒ Boolean

Requires that the value is a Fixnum or Integer and is greater or equal to 0

Parameters:

  • v (Any)

    The value validated

Returns:

  • (Boolean)

    true if the data is valid

Raises:

  • (ArgumentError)

    raised if the value is not a Fixnum or Integer value greater or equal to 0



87
88
89
# File 'lib/axlsx/util/validators.rb', line 87

def self.validate_unsigned_int(v)
  DataTypeValidator.validate(:unsigned_int, [Fixnum, Integer], v, lambda { |arg| arg.respond_to?(:>=) && arg >= 0 })
end