summaryrefslogtreecommitdiffhomepage
path: root/math_plus.rb
diff options
context:
space:
mode:
Diffstat (limited to 'math_plus.rb')
-rw-r--r--math_plus.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/math_plus.rb b/math_plus.rb
new file mode 100644
index 0000000..eac8d21
--- /dev/null
+++ b/math_plus.rb
@@ -0,0 +1,5 @@
+module MathPlus
+ def self.divisors_of(num)
+ (1..num).select { |n| (num % n).zero? }
+ end
+end