Sha256: 4c558b63ef72af09c64186129b775aadd9a91150df02cb33f1f806683a89bba2
Contents?: true
Size: 795 Bytes
Versions: 69
Compression:
Stored size: 795 Bytes
Contents
module Pageflow # Represents a set of configuration changes that can be performed # based on account or entry feature flags. # # @since 0.9 class Feature # Unique identifyer of feature. # # @return [String] attr_reader :name # Create a block based feature. # # @param name [String] Unique identifyer of feature. # @yieldparam config [Configuration] The configuration object to manipulate. def initialize(name, &block) @name = name @block = block end # Perform any configuration change that is needed to activate this # feature. # # @param config [Configuration] def enable(config) @block.call(config) if @block end def name_translation_key "pageflow.#{name}.feature_name" end end end
Version data entries
69 entries across 69 versions & 1 rubygems