Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/core_ext/numeric.rb

Instance Method Summary collapse

Instance Method Details

#divisible_by?(int, offset = 0) ⇒ Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/core_ext/numeric.rb', line 2

def divisible_by?(int, offset = 0)
  modulo(int) == offset
end