Module: Parliament::Utils::Helpers::FlagHelper
- Defined in:
- lib/parliament/utils/helpers/flag_helper.rb
Class Method Summary collapse
- .dissolution? ⇒ Boolean
- .election? ⇒ Boolean
- .election_period? ⇒ Boolean
- .post_election? ⇒ Boolean
- .register_to_vote? ⇒ Boolean
Class Method Details
.dissolution? ⇒ Boolean
5 6 7 8 |
# File 'lib/parliament/utils/helpers/flag_helper.rb', line 5 def self.dissolution? # When in the dissolution period BANDIERA_CLIENT.enabled?('parliament', 'show-dissolution') end |
.election? ⇒ Boolean
15 16 17 |
# File 'lib/parliament/utils/helpers/flag_helper.rb', line 15 def self.election? BANDIERA_CLIENT.enabled?('parliament', 'show-election') end |
.election_period? ⇒ Boolean
23 24 25 |
# File 'lib/parliament/utils/helpers/flag_helper.rb', line 23 def self.election_period? (election? == true || post_election? == true) end |
.post_election? ⇒ Boolean
19 20 21 |
# File 'lib/parliament/utils/helpers/flag_helper.rb', line 19 def self.post_election? BANDIERA_CLIENT.enabled?('parliament', 'show-post-election') end |
.register_to_vote? ⇒ Boolean
10 11 12 13 |
# File 'lib/parliament/utils/helpers/flag_helper.rb', line 10 def self.register_to_vote? # When in dissolution but still in the registration period BANDIERA_CLIENT.enabled?('parliament', 'show-register') end |