Class: SimpleFormMarkdownEditor::Renderer
- Inherits:
-
Struct
- Object
- Struct
- SimpleFormMarkdownEditor::Renderer
- Defined in:
- lib/simple_form_markdown_editor/renderer.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#str ⇒ Object
Returns the value of attribute str.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options
4 5 6 |
# File 'lib/simple_form_markdown_editor/renderer.rb', line 4 def end |
#str ⇒ Object
Returns the value of attribute str
4 5 6 |
# File 'lib/simple_form_markdown_editor/renderer.rb', line 4 def str @str end |
Class Method Details
.call(*args) ⇒ Object
5 6 7 |
# File 'lib/simple_form_markdown_editor/renderer.rb', line 5 def self.call(*args) new(*args).call end |
Instance Method Details
#call ⇒ Object
25 26 27 28 |
# File 'lib/simple_form_markdown_editor/renderer.rb', line 25 def call return unless str.present? markdown_renderer.render(str).html_safe end |
#extensions ⇒ Object
21 22 23 |
# File 'lib/simple_form_markdown_editor/renderer.rb', line 21 def extensions @extensions ||= .fetch(:extensions, MarkdownEditorInput.configuration.extensions) end |
#render_class ⇒ Object
13 14 15 |
# File 'lib/simple_form_markdown_editor/renderer.rb', line 13 def render_class @render_class ||= .fetch(:render_class, MarkdownEditorInput.configuration.render_class) end |
#render_options ⇒ Object
17 18 19 |
# File 'lib/simple_form_markdown_editor/renderer.rb', line 17 def ||= .fetch(:render_options, MarkdownEditorInput.configuration.) end |