Sha256: 5dc099a49b728468907955957a6a7a25069940fdf47fe6cfcf24dea731c30484
Contents?: true
Size: 270 Bytes
Versions: 143
Compression:
Stored size: 270 Bytes
Contents
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
Version data entries
143 entries across 115 versions & 24 rubygems