module Coco module App module Blocks class Faqs < Coco::Component renders_many :entries, ->(question, id: nil, &block) do @entries << {question:, answer: block.call, id:} end def initialize(title: "Frequently asked questions", **) @title = title @entries = [] end end end end end