Module: Lookbook::PreviewAfterRender
- Included in:
- Preview
- Defined in:
- lib/lookbook/preview_after_render.rb
Overview
Shared module that both Lookbook::Preview and ViewComponent::Preview are extended with
Instance Method Summary collapse
Instance Method Details
#after_render(method:, html:, context:) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/lookbook/preview_after_render.rb', line 4 def after_render(method:, html:, context:) instance = new if instance.method(method).arity > 1 instance.send(method, html, context) else instance.send(method, html) end.html_safe end |