Sha256: fcdaaf47cd16bd0611fc741417de8a2853d5cdcb0e68a28b706697cec28161c4
Contents?: true
Size: 499 Bytes
Versions: 6
Compression:
Stored size: 499 Bytes
Contents
module Coradoc module Element class Term < Base attr_accessor :term, :options declare_children :term, :options def initialize(term, options = {}) @term = term @type = options.fetch(:type, nil) @lang = options.fetch(:lang, :en) @line_break = options.fetch(:line_break, "") end def to_adoc return "#{@type}:[#{@term}]#{@line_break}" if @lang == :en "[#{@type}]##{@term}##{@line_break}" end end end end
Version data entries
6 entries across 6 versions & 1 rubygems