Class: Pageflow::EntryTypeConfiguration::FeaturesDelegator Private
- Inherits:
-
Struct
- Object
- Struct
- Pageflow::EntryTypeConfiguration::FeaturesDelegator
- Defined in:
- lib/pageflow/entry_type_configuration.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#entry_type ⇒ Object
Returns the value of attribute entry_type.
Instance Method Summary collapse
- #enable_by_default(name) ⇒ Object private
- #register(feature, &block) ⇒ Object private
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config
30 31 32 |
# File 'lib/pageflow/entry_type_configuration.rb', line 30 def config @config end |
#entry_type ⇒ Object
Returns the value of attribute entry_type
30 31 32 |
# File 'lib/pageflow/entry_type_configuration.rb', line 30 def entry_type @entry_type end |
Instance Method Details
#enable_by_default(name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 |
# File 'lib/pageflow/entry_type_configuration.rb', line 44 def enable_by_default(name) config.features.enable_by_default(name) end |
#register(feature, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/pageflow/entry_type_configuration.rb', line 31 def register(feature, &block) return register(Feature.new(feature, &block)) if feature.is_a?(String) entry_type_feature = Feature.new( feature.name, name_translation_key: feature.name_translation_key ) do |feature_config| feature_config.for_entry_type(entry_type, &feature.method(:enable)) end config.features.register(entry_type_feature) end |