module Pugin::Feature::Bandiera

Public Class Methods

dissolution?() click to toggle source
# File lib/pugin/feature/bandiera.rb, line 5
def dissolution?
        get_features
        @features.fetch('show-dissolution', false)
end
election?() click to toggle source
# File lib/pugin/feature/bandiera.rb, line 15
def election?
        get_features
        @features.fetch('show-election', false)
end
post_election?() click to toggle source
# File lib/pugin/feature/bandiera.rb, line 20
def post_election?
        get_features
        @features.fetch('show-post-election', false)
end
register_to_vote?() click to toggle source
# File lib/pugin/feature/bandiera.rb, line 10
def register_to_vote?
        get_features
        @features.fetch('show-register', false)
end
reset() click to toggle source

Reset cached features

# File lib/pugin/feature/bandiera.rb, line 56
def reset
        @features = nil
end
show_committees?() click to toggle source
# File lib/pugin/feature/bandiera.rb, line 30
def show_committees?
        get_features
        @features.fetch('show-committees', false)
end
show_government_roles?() click to toggle source
# File lib/pugin/feature/bandiera.rb, line 35
def show_government_roles?
        get_features
        @features.fetch('show-government-roles', false)
end
show_list_images?() click to toggle source
# File lib/pugin/feature/bandiera.rb, line 25
def show_list_images?
        get_features
        @features.fetch('show-list-images', false)
end
show_lords_ineligibility_banner?() click to toggle source
# File lib/pugin/feature/bandiera.rb, line 50
def show_lords_ineligibility_banner?
        get_features
        @features.fetch('show-lords-ineligibility-banner', false)
end
show_opposition_roles?() click to toggle source
# File lib/pugin/feature/bandiera.rb, line 40
def show_opposition_roles?
        get_features
        @features.fetch('show-opposition-roles', false)
end

Private Class Methods

get_features() click to toggle source

Get features if not already cached

# File lib/pugin/feature/bandiera.rb, line 63
def get_features
        @features ||= Pugin::BANDIERA_CLIENT.get_features_for_group('parliament')
end