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.7.0 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.6.1 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.6.0 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.5.0 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.4.2 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.4.1 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.4.0 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.3.2 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.3.1 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.3.0 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.2.5 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.2.4 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.2.3 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.2.2 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.2.1 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.2.0 lib/parliament/utils/helpers/flag_helper.rb
parliament-utils-0.1.0 lib/parliament/utils/helpers/flag_helper.rb