Sha256: 245f576f2a6035f24f2ca27369110c089059187e4e5904e3a8c5b05e75e4c5ba

Contents?: true

Size: 414 Bytes

Versions: 30

Compression:

Stored size: 414 Bytes

Contents

require 'explicit_delegator'

module WoopleTheme
  module Dashboard
    class StatusAlertPresenter < ExplicitDelegator
      enforce_definitions :color, :description

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

      def color
        __getobj__.color.to_s.capitalize!
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
woople-theme-0.6.11 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.6.10 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.6.9 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.6.8 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.6.7 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.6.6 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.6.5 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.6.4 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.6.3 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.6.2 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.6.1 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.6 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.5.17 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.5.16 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.5.15 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.5.14 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.5.13 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.5.12 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.5.11 app/presenters/woople_theme/dashboard/status_alert_presenter.rb
woople-theme-0.5.10 app/presenters/woople_theme/dashboard/status_alert_presenter.rb