title: NoMethodError: Undefined Method When Using Partition Enumerable
body: <p>I read about the Ruby Enumerable partition and wanted to refactor my credit card validator project include it.</p>
  
  <pre><code>class CreditCheck
  
    attr_reader :number, :flipped, :split
  
    def initialize(number)
  @number = number.split("").map { |s| s.to_i}
  end
  
    def flip_number
  @flipped = @number.reverse
    end
  
    def check_validity
  @split = @flipped.partition.with_index { |x , index|
    index.even?}
  @split
    end
  
  end
  </code></pre>
  
  <p>This returns: </p>
  
  <pre><code>NoMethodError: undefined method `partition' for nil:NilClass
  </code></pre>
  
  <p>Any help on how to fix this? I'm sure I am just missing a small detail.</p>