Class: GovukPublishingComponents::Presenters::EmergencyBannerHelper
- Inherits:
-
Object
- Object
- GovukPublishingComponents::Presenters::EmergencyBannerHelper
- Defined in:
- lib/govuk_publishing_components/presenters/emergency_banner_helper.rb
Constant Summary collapse
- EMERGENCY_TYPES =
%w[notable-death national-emergency local-emergency].freeze
Instance Method Summary collapse
- #emergency_types ⇒ Object
-
#initialize ⇒ EmergencyBannerHelper
constructor
A new instance of EmergencyBannerHelper.
- #is_a_valid_emergency_type?(type) ⇒ Boolean
Constructor Details
#initialize ⇒ EmergencyBannerHelper
Returns a new instance of EmergencyBannerHelper.
6 |
# File 'lib/govuk_publishing_components/presenters/emergency_banner_helper.rb', line 6 def initialize; end |
Instance Method Details
#emergency_types ⇒ Object
8 9 10 |
# File 'lib/govuk_publishing_components/presenters/emergency_banner_helper.rb', line 8 def emergency_types EMERGENCY_TYPES end |
#is_a_valid_emergency_type?(type) ⇒ Boolean
12 13 14 |
# File 'lib/govuk_publishing_components/presenters/emergency_banner_helper.rb', line 12 def is_a_valid_emergency_type?(type) EMERGENCY_TYPES.include?(type) end |