Module: Lottery::LotteryHelper
Instance Method Summary collapse
Instance Method Details
#draw(max = 0, amount = 0) ⇒ Object
3 4 5 |
# File 'lib/lottery/helper.rb', line 3 def draw(max = 0, amount = 0) [*1..max].sample(amount).sort end |
#make_hash(arr1, arr2 = nil) ⇒ Object
7 8 9 |
# File 'lib/lottery/helper.rb', line 7 def make_hash(arr1, arr2 = nil) { first: arr1, second: arr2 } end |