Class: Renalware::HD::StationPresenter

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.policy_classObject



16
17
18
# File 'app/presenters/renalware/hd/station_presenter.rb', line 16

def self.policy_class
  StationPolicy
end

Instance Method Details

#cssObject



10
11
12
13
14
# File 'app/presenters/renalware/hd/station_presenter.rb', line 10

def css
  return if location.blank?

  "background-color: #{location&.colour}"
end

#nameObject



6
7
8
# File 'app/presenters/renalware/hd/station_presenter.rb', line 6

def name
  super.presence || "Unnamed Station"
end