From 8705b3d7124d4c530824876f85e4e7f11c90f23d Mon Sep 17 00:00:00 2001 From: lispy-dobby Date: Fri, 18 Oct 2019 14:37:28 +0300 Subject: [PATCH] num >= 0 && num < 100 to num.between(0,99) it is more readable --- lib/geezify-rb/geezify.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/geezify-rb/geezify.rb b/lib/geezify-rb/geezify.rb index fae286a..f5d2dfb 100644 --- a/lib/geezify-rb/geezify.rb +++ b/lib/geezify-rb/geezify.rb @@ -30,8 +30,7 @@ def geezify_2digit(num) oneth_array = Array['', '፩', '፪', '፫', '፬', '፭', '፮', '፯', '፰', '፱'] tenth_array = Array['', '፲', '፳', '፴', '፵', '፶', '፷', '፸', '፹', '፺'] raise ArgumentError, ERROR_MSG1 unless num.integer? && - num >= 0 && - num < 100 + num.between?(0,99) tenth_array[(num / 10)] + oneth_array[num % 10] end