class Rack::AllocationStats::Formatters::JSON
Copyright 2013 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0, found in the LICENSE file.
Public Instance Methods
format()
click to toggle source
# File lib/rack/allocation_stats/formatters/json.rb, line 5 def format allocations = @allocations.to_a.map do |group_key, allocations| { group_key: group_key, allocations: allocations } end return [Yajl::Encoder.encode(allocations)] end