Class: Maglev::GetPageSectionNames
- Inherits:
-
Object
- Object
- Maglev::GetPageSectionNames
- Includes:
- Injectable
- Defined in:
- app/services/maglev/get_page_section_names.rb
Overview
Get an array of maps including the id and name of each page section.
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 |
# File 'app/services/maglev/get_page_section_names.rb', line 12 def call (page.sections || []).map do |section| definition = theme.sections.find(section['type']) { id: section['id'], name: definition.name } end end |