Skip to content

Instantly share code, notes, and snippets.

@salma71
Last active March 16, 2018 21:05
Show Gist options
  • Save salma71/dd41123fcd6844bcca67ad65ff00b30f to your computer and use it in GitHub Desktop.
Save salma71/dd41123fcd6844bcca67ad65ff00b30f to your computer and use it in GitHub Desktop.
def self.display_product
@@all.each.with_index(1) do |product, i|
puts " #{i}. #{product.name}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment