Sha256: f7d4c66aedfe95b4a7657640ddfb6e76cfdafd86e8b4cd629084e2e43181decd
Contents?: true
Size: 477 Bytes
Versions: 25
Compression:
Stored size: 477 Bytes
Contents
# frozen_string_literal: true module Maglev # Get an array of maps including the id and name of each page section. class GetPageSectionNames include Injectable dependency :fetch_theme argument :page def call (page.sections || []).map do |section| definition = theme.sections.find(section['type']) { id: section['id'], name: definition.name } end end protected def theme fetch_theme.call end end end
Version data entries
25 entries across 25 versions & 1 rubygems