lib/allocation_stats/allocations_proxy.rb
# Sort allocation groups by the number of allocations in each group.
Sort allocation groups by the number of allocations in each group.
Sort allocation groups by the number of allocations in each group .
def sort_by_size
      @mappers << Proc.new do |allocations|
        allocations.sort_by { |key, value| -value.size }
                   .inject({}) { |hash, pair| hash[pair[0]] = pair[1]; hash }
      end
      self
    end
def sort_by_size @mappers << Proc . new do | allocations | allocations . sort_by { | key , value | - value . size } . inject ( { } ) { | hash , pair | hash [ pair [ 0 ] ] = pair [ 1 ] ; hash } end self end
Sort allocation groups by the number of allocations in each group.
Sort allocation groups by the number of allocations in each group .