Class: Pageflow::CommonEntrySeedHelper::FileUrlTemplatesSeed Private
- Inherits:
-
Object
- Object
- Pageflow::CommonEntrySeedHelper::FileUrlTemplatesSeed
- Defined in:
- app/helpers/pageflow/common_entry_seed_helper.rb
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 readonly private
Instance Method Summary collapse
- #as_json ⇒ Object private
-
#initialize(config) ⇒ FileUrlTemplatesSeed
constructor
private
A new instance of FileUrlTemplatesSeed.
Constructor Details
#initialize(config) ⇒ FileUrlTemplatesSeed
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.
Returns a new instance of FileUrlTemplatesSeed.
25 26 27 |
# File 'app/helpers/pageflow/common_entry_seed_helper.rb', line 25 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
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.
23 24 25 |
# File 'app/helpers/pageflow/common_entry_seed_helper.rb', line 23 def config @config end |
Instance Method Details
#as_json ⇒ 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.
29 30 31 32 33 |
# File 'app/helpers/pageflow/common_entry_seed_helper.rb', line 29 def as_json config.file_types.each_with_object({}) do |file_type, result| result[file_type.collection_name] = file_type.url_templates.call end end |