class Rack::Bug::MustachePanel::View

def variables

Any variables used in this page load are collected and displayed.
def variables
  vars = MustachePanel.variables.sort_by { |key, _| key.to_s }
  vars.map do |key, value|
    # Arrays can get too huge. Just show the first 10 to give you
    # some idea.
    if value.is_a?(Array) && value.size > 10
      size = value.size
      value = value.first(10)
      value << "...and #{size - 10} more"
    end
    { :key => key, :value => value.inspect }
  end
end