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
25 26 27 |
# File 'lib/pageflow/entry_type_configuration.rb', line 25 def config @config end |
#entry_type ⇒ Object
Returns the value of attribute entry_type
25 26 27 |
# File 'lib/pageflow/entry_type_configuration.rb', line 25 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.
39 40 41 |
# File 'lib/pageflow/entry_type_configuration.rb', line 39 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.
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/pageflow/entry_type_configuration.rb', line 26 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 |