Sha256: e6a17e47e55b2db54585f5a941e558c79411ca7e0f83a6169bdc9f9523f292df
Contents?: true
Size: 903 Bytes
Versions: 6
Compression:
Stored size: 903 Bytes
Contents
module Coradoc module Element module Image class BlockImage < Core def initialize(title, id, src, options = {}) super @colons = "::" end def to_adoc missing = "// FIXME: Missing image: #{@annotate_missing}\n" if @annotate_missing anchor = @anchor.nil? ? "" : "#{@anchor.to_adoc}\n" title = ".#{@title}\n" unless @title.to_s.empty? attrs = @attributes.to_adoc [missing, anchor, title, "image", @colons, @src, attrs, @line_break].join("") end def validate_named @attributes.validate_named(VALIDATORS_NAMED, VALIDATORS_NAMED_BLOCK) end extend AttributeList::Matchers VALIDATORS_NAMED_BLOCK = { caption: String, align: one("left", "center", "right"), float: one("left", "right"), } end end end end
Version data entries
6 entries across 6 versions & 1 rubygems