DEV Community

Discussion on: It's Ruby, There Must Be a Better Way

Collapse
 
egilburg profile image
Eugene Gilburg

Instead of:

  @@names = POSSIBLE_NAMES.to_a.shuffle.each

  def self.forget
    @@names = POSSIBLE_NAMES.to_a.shuffle.each
  end

You can just write:

  def self.forget
    @@names = POSSIBLE_NAMES.to_a.shuffle.each
  end

  forget
Collapse
 
rpalo profile image
Ryan Palo

I wondered about that. That totally makes sense. Thanks!