Class: Pageflow::CommonEntrySeedHelper::PageTypesSeed Private
- Inherits:
-
Object
- Object
- Pageflow::CommonEntrySeedHelper::PageTypesSeed
- 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
- #entry ⇒ Object readonly private
Instance Method Summary collapse
- #as_json ⇒ Object private
-
#initialize(entry, config) ⇒ PageTypesSeed
constructor
private
A new instance of PageTypesSeed.
Constructor Details
#initialize(entry, config) ⇒ PageTypesSeed
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 PageTypesSeed.
17 18 19 20 |
# File 'app/helpers/pageflow/common_entry_seed_helper.rb', line 17 def initialize(entry, config) @entry = entry @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.
15 16 17 |
# File 'app/helpers/pageflow/common_entry_seed_helper.rb', line 15 def config @config end |
#entry ⇒ 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.
15 16 17 |
# File 'app/helpers/pageflow/common_entry_seed_helper.rb', line 15 def entry @entry 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.
22 23 24 25 26 |
# File 'app/helpers/pageflow/common_entry_seed_helper.rb', line 22 def as_json config.page_types.each_with_object({}) do |page_type, result| result[page_type.name.to_sym] = page_type_seed(page_type) end end |