329e7f4441
7a2554d9a3
1 2 3
4
5 6
class Integer # Check whether the integer is evenly divisible by the argument. def multiple_of?(number) number != 0 ? self % number == 0 : zero? end end