Class: Viewable::TextPresenter

Inherits:
ViewablePresenter show all
Defined in:
app/presenters/viewable/text_presenter.rb

Instance Attribute Summary

Attributes inherited from BasePresenter

#context, #model

Instance Method Summary collapse

Methods inherited from ViewablePresenter

#edit_link, #li_sortable_tag

Methods inherited from BasePresenter

#initialize, #method_missing, #respond_to?

Constructor Details

This class inherits a constructor from BasePresenter

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class BasePresenter

Instance Method Details

#htmlObject



3
4
5
# File 'app/presenters/viewable/text_presenter.rb', line 3

def html
  m.text.try(:html_safe)
end

#textObject



7
8
9
# File 'app/presenters/viewable/text_presenter.rb', line 7

def text
  h.strip_tags m.text
end