File: README.rdoc

package info (click to toggle)
ruby-multimap 1.1.2%2Bgh-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 228 kB
  • ctags: 96
  • sloc: ruby: 1,464; ansic: 18; makefile: 2
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"}>