Class: Renalware::HD::SessionAccessPresenter
- Inherits:
-
Object
- Object
- Renalware::HD::SessionAccessPresenter
- Defined in:
- app/presenters/renalware/hd/session_access_presenter.rb
Instance Method Summary collapse
-
#initialize(session) ⇒ SessionAccessPresenter
constructor
A new instance of SessionAccessPresenter.
- #to_html ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(session) ⇒ SessionAccessPresenter
Returns a new instance of SessionAccessPresenter.
6 7 8 |
# File 'app/presenters/renalware/hd/session_access_presenter.rb', line 6 def initialize(session) @session = session end |
Instance Method Details
#to_html ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'app/presenters/renalware/hd/session_access_presenter.rb', line 19 def to_html return "" unless info [ abbreviated_type, abbreviated_side ].compact.join("/").html_safe end |
#to_s ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/presenters/renalware/hd/session_access_presenter.rb', line 10 def to_s return "" unless info [ info.access_type, info.access_side&.capitalize ].compact.join("<br/>") end |