|
|
@ -90,6 +90,7 @@ end
|
|
|
|
|
|
|
|
|
|
|
|
def cage_dump_list(list)
|
|
|
|
def cage_dump_list(list)
|
|
|
|
count_total = Hash.new(0)
|
|
|
|
count_total = Hash.new(0)
|
|
|
|
|
|
|
|
empty_cages = 0
|
|
|
|
list.each { |cage|
|
|
|
|
list.each { |cage|
|
|
|
|
count = Hash.new(0)
|
|
|
|
count = Hash.new(0)
|
|
|
|
|
|
|
|
|
|
|
@ -113,13 +114,18 @@ def cage_dump_list(list)
|
|
|
|
else cage._rtti_classname
|
|
|
|
else cage._rtti_classname
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
puts "#{type} ##{cage.id}: ", count.sort_by { |k, v| v }.map { |k, v| " #{v} #{k}" }
|
|
|
|
if count.empty?
|
|
|
|
|
|
|
|
empty_cages += 1
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
puts "#{type} ##{cage.id}: ", count.sort_by { |k, v| v }.map { |k, v| " #{v} #{k}" }
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
count.each { |k, v| count_total[k] += v }
|
|
|
|
count.each { |k, v| count_total[k] += v }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if list.length > 2
|
|
|
|
if list.length > 2
|
|
|
|
puts '', "Total: ", count_total.sort_by { |k, v| v }.map { |k, v| " #{v} #{k}" }
|
|
|
|
puts '', "Total: ", count_total.sort_by { |k, v| v }.map { |k, v| " #{v} #{k}" }
|
|
|
|
|
|
|
|
puts "with #{plural(empty_cages, 'empty cage')}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|