Module: Lookbook::OutputHelper
- Included in:
- Code::Component, Prose::Component
- Defined in:
- app/helpers/lookbook/output_helper.rb
Instance Method Summary collapse
- #beautify(*args, **opts) ⇒ Object
- #highlight(*args, **opts) ⇒ Object
- #markdown(text = nil, &block) ⇒ Object
- #pretty_json(obj) ⇒ Object
Instance Method Details
#beautify(*args, **opts) ⇒ Object
11 12 13 |
# File 'app/helpers/lookbook/output_helper.rb', line 11 def beautify(*args, **opts) CodeBeautifier.call(*args, **opts) end |
#highlight(*args, **opts) ⇒ Object
7 8 9 |
# File 'app/helpers/lookbook/output_helper.rb', line 7 def highlight(*args, **opts) CodeHighlighter.call(*args, **opts) end |
#markdown(text = nil, &block) ⇒ Object
3 4 5 |
# File 'app/helpers/lookbook/output_helper.rb', line 3 def markdown(text = nil, &block) MarkdownRenderer.call(block ? capture(&block) : text, Lookbook.config.) end |
#pretty_json(obj) ⇒ Object
15 16 17 |
# File 'app/helpers/lookbook/output_helper.rb', line 15 def pretty_json(obj) JSON.pretty_generate(obj) end |