Class: Spina::RichTextPresenter
- Inherits:
-
Object
- Object
- Spina::RichTextPresenter
- Defined in:
- app/presenters/spina/rich_text_presenter.rb
Constant Summary collapse
- EMBED_CONTENT_TYPE =
"application/vnd+spina.embed+html"
Instance Attribute Summary collapse
-
#html ⇒ Object
readonly
Returns the value of attribute html.
-
#view_context ⇒ Object
readonly
Returns the value of attribute view_context.
Instance Method Summary collapse
-
#initialize(view_context, html) ⇒ RichTextPresenter
constructor
A new instance of RichTextPresenter.
- #to_s ⇒ Object
Constructor Details
#initialize(view_context, html) ⇒ RichTextPresenter
Returns a new instance of RichTextPresenter.
7 8 9 10 |
# File 'app/presenters/spina/rich_text_presenter.rb', line 7 def initialize(view_context, html) @view_context = view_context || Spina::Current.page&.view_context @html = html end |
Instance Attribute Details
#html ⇒ Object (readonly)
Returns the value of attribute html.
3 4 5 |
# File 'app/presenters/spina/rich_text_presenter.rb', line 3 def html @html end |
#view_context ⇒ Object (readonly)
Returns the value of attribute view_context.
3 4 5 |
# File 'app/presenters/spina/rich_text_presenter.rb', line 3 def view_context @view_context end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'app/presenters/spina/rich_text_presenter.rb', line 12 def to_s ActiveSupport::SafeBuffer.new((html)) end |