class Contracts::Builtin::Neg
Check that an argument is a negative number.
Public Class Methods
Source
# File lib/contracts/builtin_contracts.rb, line 41 def self.valid? val val.is_a?(Numeric) && val.negative? end
Check that an argument is a negative number.
# File lib/contracts/builtin_contracts.rb, line 41 def self.valid? val val.is_a?(Numeric) && val.negative? end