Class: WoopleTheme::Dashboard::StatusAlertPresenter

Inherits:
ExplicitDelegator show all
Defined in:
app/presenters/woople_theme/dashboard/status_alert_presenter.rb

Instance Method Summary collapse

Methods inherited from ExplicitDelegator

enforce_definitions, #enforced_methods, #ensure_defined, #initialize

Constructor Details

This class inherits a constructor from ExplicitDelegator

Instance Method Details

#colorObject



17
18
19
# File 'app/presenters/woople_theme/dashboard/status_alert_presenter.rb', line 17

def color
  @delegate.color.to_s.capitalize!
end

#css_classObject



8
9
10
11
12
13
14
15
# File 'app/presenters/woople_theme/dashboard/status_alert_presenter.rb', line 8

def css_class
  case @delegate.color
  when :red
    'alert-error'
  when :green
    'alert-success'
  end
end