title: Ruby - Finding primes under 100?
body: <p>I'd like to write a code that prints out all primes under 100. Here is the code I have so far</p>
  
  <pre><code>class Numbers
  
    def is_a_prime?(int)
      x = 2
      while x &lt; int/2
        if int % x == 0
          return false
        else
          return true
        end
      end
    end
  
    def primes_under_100
      x = 2
      while x &lt; 100
        print x if is_a_prime?(x) # calling the method I defined above
        x+= 1
      end
    end
  end
  </code></pre>
  
  <p>Unfortunately when I call the method using primes_under_100 I get</p>
  
  <pre><code>undefined local variable or method 'primes_under_100' for main:Object
  </code></pre>
  
  <p>I'd like to know where I went wrong. None of my methods are private. Help is appreciated.</p>