Skip to content

Instantly share code, notes, and snippets.

@elektronaut
Created May 5, 2013 23:19
Show Gist options
  • Save elektronaut/5522556 to your computer and use it in GitHub Desktop.
Save elektronaut/5522556 to your computer and use it in GitHub Desktop.
class List
def initialize
@list = Hash.new(0)
end
def add_item(item)
@list[item] += 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment