Class: DebugBar::RecipeBook::Default
- Defined in:
- lib/debug-bar/recipe_book/default.rb
Overview
A default RecipeBook with recipes useful for Rails applications.
Instance Method Summary collapse
-
#cookies_recipe ⇒ Object
Displays the cookies.
-
#params_recipe(opts = {}) ⇒ Object
Displays params in a user readable fashion.
-
#session_recipe ⇒ Object
Displays the session in a pretty printed way.
Methods inherited from Base
#include?, #recipe, #recipes, #template_search_paths, #template_search_paths=
Instance Method Details
#cookies_recipe ⇒ Object
Displays the cookies.
28 29 30 |
# File 'lib/debug-bar/recipe_book/default.rb', line 28 def return Proc.new {|b| ['Cookies', b[:cookies].awesome_print_html, {:id => 'cookies'}]} end |
#params_recipe(opts = {}) ⇒ Object
Displays params in a user readable fashion.
If the :cutoff option is given, it auto-hides when the params are more characters in length than the cutoff, otherwise it defaults to a sane length.
15 16 17 18 19 20 |
# File 'lib/debug-bar/recipe_book/default.rb', line 15 def params_recipe(opts={}) return Proc.new do |b| params_s = b[:params].awesome_print_html ['Params', params_s, {:id => 'params'}] end end |
#session_recipe ⇒ Object
Displays the session in a pretty printed way.
23 24 25 |
# File 'lib/debug-bar/recipe_book/default.rb', line 23 def session_recipe return Proc.new {|b| ['Session', b[:session].awesome_print_html, {:id => 'session'}]} end |