Method: Numeric#negative?
- Defined in:
- lib/extra_lib/core_ext/numeric.rb
#negative? ⇒ Boolean
Checks whether a number is a negative number. Example: -4.negative? #=> true
Returns: True or false
10 11 12 |
# File 'lib/extra_lib/core_ext/numeric.rb', line 10 def negative? self < 0 end |