title: Finding a prime number using a **custom** Ruby method
body: <p>I would like to pass an array of <code>numbers</code> to my <code>is_prime?</code> method and return if the numbers are valid or not. I do not want to use: </p>
  
  <pre><code>require 'prime'
  a = [1,2,3,4,5]
  Hash[a.zip(a.map(&amp;Prime.method(:prime?)))]
  </code></pre>
  
  <p>This is learning experience. My current code is only outputing the first number in the array. Can someone help me understand what I am doing wrong? Thanks!</p>
  
  <pre><code>def is_prime?(*nums)
  i = 2
      nums.each do |num|
          while i &lt; num
              is_divisible = ((num % i) == 0)
                  if is_divisible == false
                      x = "#{num}: is NOT a prime number." #false
                 else
                      x = "#{num}: is a prime number." #true
                  end
  
              i +=1   
          end
          return x
      end
  end
  
  puts is_prime?(27,13,42)
  </code></pre>