Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v3.2.4
Fetching contributors…

Cannot retrieve contributors at this time

11 lines (10 sloc) 0.27 kb
class Integer
# Check whether the integer is evenly divisible by the argument.
#
# 0.multiple_of?(0) #=> true
# 6.multiple_of?(5) #=> false
# 10.multiple_of?(2) #=> true
def multiple_of?(number)
number != 0 ? self % number == 0 : zero?
end
end
Jump to Line
Something went wrong with that request. Please try again.