class Myco::DEV::Counter

Public Class Methods

coll() click to toggle source
# File lib/myco/dev/counter.rb, line 6
def coll
  @coll ||= begin
    at_exit { print! }
    Hash.new(0)
  end
end
count(*items) click to toggle source
# File lib/myco/dev/counter.rb, line 13
def count(*items)
  coll[items] += 1
end
print!() click to toggle source