Sha256: bb0c88afcc78f91698236b0c0637faba3d4f8acd6bbc696702ac384221b326ff

Contents?: true

Size: 808 Bytes

Versions: 9

Compression:

Stored size: 808 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

9 entries across 9 versions & 1 rubygems

Version Path
pugin-1.2.5 lib/pugin/feature/bandiera.rb
pugin-1.2.4 lib/pugin/feature/bandiera.rb
pugin-1.2.3 lib/pugin/feature/bandiera.rb
pugin-1.2.2 lib/pugin/feature/bandiera.rb
pugin-1.2.1 lib/pugin/feature/bandiera.rb
pugin-1.2.0 lib/pugin/feature/bandiera.rb
pugin-1.1.2 lib/pugin/feature/bandiera.rb
pugin-1.0.1.pre lib/pugin/feature/bandiera.rb
pugin-1.0.1 lib/pugin/feature/bandiera.rb