Parent

Methods

Rack::Bug::MustachePanel::View

The view is responsible for rendering our panel. While Rack::Bug takes care of the nav, the content rendered by View is used for the panel itself.

Public Instance Methods

times() click to toggle source

We track the render times of all the Mustache views on this page load.

# File lib/rack/bug/panels/mustache_panel.rb, line 22
def times
  MustachePanel.times.map do |key, value|
    { :key => key, :value => value }
  end
end
variables() click to toggle source

Any variables used in this page load are collected and displayed.

# File lib/rack/bug/panels/mustache_panel.rb, line 29
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

[Validate]

Generated with the Darkfish Rdoc Generator 2.