instance method
multiple_of?
Ruby on Rails 3.0.20
Since v3.0.20Signature
multiple_of?(number)
Check whether the integer is evenly divisible by the argument.
Parameters
-
numberreq
Source
# File activesupport/lib/active_support/core_ext/integer/multiple.rb, line 3
def multiple_of?(number)
number != 0 ? self % number == 0 : zero?
end
Defined in activesupport/lib/active_support/core_ext/integer/multiple.rb line 3
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Integer