Sha256: 007324b11ce3321210910e9019651b95a67cf38d51a903d1366c0fa84a9e65ac
Contents?: true
Size: 528 Bytes
Versions: 16
Compression:
Stored size: 528 Bytes
Contents
# frozen_string_literal: true module DocTemplate module Tags class VocabTag < BlockTag TAG_NAME = 'vocab' TEMPLATE = 'vocab.html.erb' def parse(node, opts = {}) nodes = block_nodes node nodes.each(&:remove) params = { content: parse_nested(nodes.map(&:to_html).join, opts) } @content = parse_template params, TEMPLATE replace_tag node self end end end Template.register_tag(Tags::VocabTag::TAG_NAME, Tags::VocabTag) end
Version data entries
16 entries across 16 versions & 1 rubygems