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