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

Version Path
lcms-engine-0.5.5 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.5.4 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.5.3 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.5.2 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.5.1 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.5.0 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.4.2 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.4.1 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.4.0 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.3.1 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.1.4 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.3.0 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.1.3 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.2.0 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.1.2 lib/doc_template/tags/vocab_tag.rb
lcms-engine-0.1.0 lib/doc_template/tags/vocab_tag.rb