Class: Renalware::HD::SessionAccessPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/renalware/hd/session_access_presenter.rb

Instance Method Summary collapse

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_htmlObject



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_sObject



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