module REXML::Parsers::EnumerableTally
Public Instance Methods
Source
# File lib/rexml/parsers/baseparser.rb, line 14 def tally counts = {} each do |item| counts[item] ||= 0 counts[item] += 1 end counts end
# File lib/rexml/parsers/baseparser.rb, line 14 def tally counts = {} each do |item| counts[item] ||= 0 counts[item] += 1 end counts end