Sha256: e050af8f64bb9bfa3a2dac0c076e7af73de95242bcec9e5696bd5c07773a32e1
Contents?: true
Size: 227 Bytes
Versions: 36
Compression:
Stored size: 227 Bytes
Contents
# coding: utf-8 class Integer def polydivisible? return true if self == 1 return false if digits.first == 0 1.upto(digits.size).all? do |first| (digits.first(first).join.to_i % first) == 0 end end end
Version data entries
36 entries across 36 versions & 1 rubygems