Sha256: 837266187787301045fa3310e05b6db2956e75dbda6f64f6dedc4663e5cacd37

Contents?: true

Size: 636 Bytes

Versions: 16

Compression:

Stored size: 636 Bytes

Contents

# frozen_string_literal: true

module DocTemplate
  module Tags
    class OptBreakTag < BaseTag
      TAG_NAME = 'optbreak'
      TEMPLATES = { default: 'opt_break.html.erb',
                    gdoc: 'gdoc/opt_break.html.erb' }.freeze

      def parse(node, opts = {})
        content = content_until_break node
        parsed_template = parse_template content, template_name(opts)
        @content = parse_nested parsed_template, opts

        replace_tag node

        # add break to agenda
        opts[:agenda].add_break
        self
      end
    end

    Template.register_tag(Tags::OptBreakTag::TAG_NAME, OptBreakTag)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

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