Sha256: bdff7e88566097bc5591605fbce9b430d72a4fc638696c6be0d10511678ab711
Contents?: true
Size: 652 Bytes
Versions: 3
Compression:
Stored size: 652 Bytes
Contents
require_relative "core" module Coradoc module Element module Block class Example < Core def initialize(title, options = {}) @title = title @id = options.fetch(:id, nil) @anchor = @id.nil? ? nil : Inline::Anchor.new(@id) @attributes = options.fetch(:attributes, AttributeList.new) @lines = options.fetch(:lines, []) @delimiter_char = "=" @delimiter_len = options.fetch(:delimiter_len, 4) end def to_adoc "\n\n#{gen_anchor}#{gen_title}#{gen_delimiter}\n" << gen_lines << "\n#{gen_delimiter}\n\n" end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
coradoc-1.1.3 | lib/coradoc/element/block/example.rb |
coradoc-1.1.2 | lib/coradoc/element/block/example.rb |
coradoc-1.1.1 | lib/coradoc/element/block/example.rb |