require 'rabbit/element/container-element' require 'rabbit/element/text-container-element' module Rabbit module Element class DescriptionList include ContainerElement def to_html(generator) "
\n#{super}\n
" end end class DescriptionListItem include ContainerElement attr_reader :term, :content def initialize(term, content) super() @term = term @content = content add_element(@term) add_element(@content) end end class DescriptionTerm include TextContainerElement def to_rd ": #{text}" end def to_html(generator) "
\n#{super}\n
" end end class DescriptionContent include ContainerElement def text super.gsub(/^/, " ") end def to_rd text.gsub(/^/, " ") end def to_html(generator) "
\n#{super}\n
" end end end end