File: README.rdoc

package info (click to toggle)
ruby-multimap 1.1.2%2Bgh-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 236 kB
  • ctags: 101
  • sloc: ruby: 1,464; ansic: 21; makefile: 3
file content (16 lines) | stat: -rw-r--r-- 397 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
= Multimap

A Ruby multimap implementation that also includes multiset and nested multimap implementations.

== Example

  require 'multimap'

  map = Multimap.new
  map["a"] = 100
  map["b"] = 200
  map["a"] = 300

  map["a"]                              # -> [100, 300]
  map["b"]                              # -> [200]
  map.keys                              # -> #<Multiset: {"a", "a", "b"}>