Types

Stats

A group of named counters

Attributes

h

The underlying Hash, expose()d

Parent types

Example

s = Stats().push('a').push('a').push('b')
s["a"]  # 2
s["b"]  # 1

a = ["x", "y", "y"]
s = Stats(a)
s["x"]  # 1
s["y"]  # 2

Methods

init(s:Stats, a:Arr)
Makes Stats, with each element in the array counted as if push()ed
push(s:Stats, k:Any)
Increment the named counter