Class: HaphazardlyGem::Lotto

Inherits:
Object
  • Object
show all
Defined in:
lib/haphazardly_gem/lotto.rb

Class Method Summary collapse

Class Method Details

.pickObject



5
6
7
8
9
10
11
12
# File 'lib/haphazardly_gem/lotto.rb', line 5

def self.pick
  output = Array.new
  while output.size <= 5
    number = rand(1..69)
    output.push(number) unless output.include? (number)
  end
  return output
end