Class: Pageflow::CommonEntrySeedHelper::PageTypesSeed Private

Inherits:
Object
  • Object
show all
Defined in:
app/helpers/pageflow/common_entry_seed_helper.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.

rubocop:todo Style/Documentation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(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.



26
27
28
# File 'app/helpers/pageflow/common_entry_seed_helper.rb', line 26

def initialize(config)
  @config = config
end

Instance Attribute Details

#configObject (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.



24
25
26
# File 'app/helpers/pageflow/common_entry_seed_helper.rb', line 24

def config
  @config
end

Instance Method Details

#as_jsonObject

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
# File 'app/helpers/pageflow/common_entry_seed_helper.rb', line 30

def as_json
  config.page_types.to_h do |page_type|
    [page_type.name.to_sym, page_type_seed(page_type)]
  end
end