Sha256: 438c730e3fe82f42f78013cb36c2325d1d05671049a3721d5ef3932766f0f34e
Contents?: true
Size: 466 Bytes
Versions: 7
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
7 entries across 7 versions & 1 rubygems