Class: DebugExtras::Dumper
- Inherits:
-
Object
- Object
- DebugExtras::Dumper
- Includes:
- ActionView::Context, ActionView::Helpers::TagHelper
- Defined in:
- lib/debug_extras/dumper.rb
Instance Method Summary collapse
-
#initialize(dump, settings) ⇒ Dumper
constructor
A new instance of Dumper.
- #render {|message| ... } ⇒ Object
Constructor Details
#initialize(dump, settings) ⇒ Dumper
Returns a new instance of Dumper.
9 10 11 12 |
# File 'lib/debug_extras/dumper.rb', line 9 def initialize(dump, settings) @dump = dump @settings = settings end |
Instance Method Details
#render {|message| ... } ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/debug_extras/dumper.rb', line 14 def render = content_tag(:div, class: 'debug-extras') do @settings.merge! Settings. output = @dump.ai Settings. output = render_object_names output output = add_styles_to_tag(:pre, output) output = add_styles_to_tag(:kbd, output) output.html_safe end yield if block_given? end |