Sha256: 9fee6ae8303f1cb3710ed3aaa328748ae581568f349925bae24316d1a531ebd1

Contents?: true

Size: 766 Bytes

Versions: 37

Compression:

Stored size: 766 Bytes

Contents

module Parliament
  module Utils
    module Helpers
      module FlagHelper
        def self.dissolution?
          # When in the dissolution period
          BANDIERA_CLIENT.enabled?('parliament', 'show-dissolution')
        end

        def self.register_to_vote?
          # When in dissolution but still in the registration period
          BANDIERA_CLIENT.enabled?('parliament', 'show-register')
        end

        def self.election?
          BANDIERA_CLIENT.enabled?('parliament', 'show-election')
        end

        def self.post_election?
          BANDIERA_CLIENT.enabled?('parliament', 'show-post-election')
        end

        def self.election_period?
          (election? == true || post_election? == true)
        end
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
parliament-utils-0.11.3 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.11.2 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.11.1 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.11.0 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.10.2 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.10.1 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.10.0 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.9.1 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.9.0 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.8.7 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.8.6 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.8.5 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.8.4 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.8.3 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.8.2 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.8.1 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.8.0 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.7.3 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.7.2 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.7.1 lib/parliament/utils/helpers/flag_helper.rb