Sha256: 22ce86c025199dec960830f2cffdba7a83e8630016bfa269118db0ca54734d75
Contents?: true
Size: 466 Bytes
Versions: 9
Compression:
Stored size: 466 Bytes
Contents
# frozen_string_literal: true module DocTemplate class DocumentToc REGISTERED_METADATA = %i(agenda sections).freeze private_constant :REGISTERED_METADATA # # Build the ToC from the first available metadata. # We're doing that to allow cross-subject data passing. # def self.parse(opts = {}) metadata = REGISTERED_METADATA.detect { |m| opts[m]&.children.present? } Objects::TocMetadata.new opts[metadata] end end end
Version data entries
9 entries across 9 versions & 1 rubygems