class Tailstrom::CounterCollection
Public Class Methods
new()
click to toggle source
# File lib/tailstrom/counter_collection.rb, line 5 def initialize clear end
Public Instance Methods
[](key)
click to toggle source
# File lib/tailstrom/counter_collection.rb, line 13 def [](key) @counters[key] end
clear()
click to toggle source
# File lib/tailstrom/counter_collection.rb, line 9 def clear @counters = Hash.new {|h, k| h[k] = Counter.new } end
each(&block)
click to toggle source
# File lib/tailstrom/counter_collection.rb, line 21 def each(&block) @counters.each &block end
empty?()
click to toggle source
# File lib/tailstrom/counter_collection.rb, line 17 def empty? @counters.empty? end
keys()
click to toggle source
# File lib/tailstrom/counter_collection.rb, line 33 def keys @counters.keys end
size()
click to toggle source
# File lib/tailstrom/counter_collection.rb, line 29 def size @counters.size end
to_a()
click to toggle source
# File lib/tailstrom/counter_collection.rb, line 25 def to_a @counters.to_a end