Sha256: e9b4308d168144bb4eb4c76837629764e5e189d817e2fa5e5e1b35b0034b56f0

Contents?: true

Size: 807 Bytes

Versions: 12

Compression:

Stored size: 807 Bytes

Contents

module Pugin
	module Feature
		module Bandiera
			class << self
				def dissolution?
					get_features

					@features.fetch('show-dissolution', false)
				end
				def register_to_vote?
					get_features

					@features.fetch('show-register', false)
				end
				def election?
					get_features

					@features.fetch('show-election', false)
				end
				def post_election?
					get_features

					@features.fetch('show-post-election', false)
				end
				def show_list_images?
					get_features

					@features.fetch('show-list-images', false)
				end


				# Reset cached features
				def reset
					@features = nil
				end

				private

				# Get features if not already cached
				def get_features
					@features ||= Pugin::BANDIERA_CLIENT.get_features_for_group('parliament')
				end
			end
		end
	end 
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pugin-1.0.0.pre lib/pugin/feature/bandiera.rb
pugin-0.9.0 lib/pugin/feature/bandiera.rb
pugin-0.8.9 lib/pugin/feature/bandiera.rb
pugin-0.8.8 lib/pugin/feature/bandiera.rb
pugin-0.8.7 lib/pugin/feature/bandiera.rb
pugin-0.8.7.pre lib/pugin/feature/bandiera.rb
pugin-0.8.6 lib/pugin/feature/bandiera.rb
pugin-0.8.6.pre lib/pugin/feature/bandiera.rb
pugin-0.8.5 lib/pugin/feature/bandiera.rb
pugin-0.8.4 lib/pugin/feature/bandiera.rb
pugin-0.8.3 lib/pugin/feature/bandiera.rb
pugin-0.8.2 lib/pugin/feature/bandiera.rb