Module: Hexp::Kramdown

Defined in:
lib/hexp/kramdown.rb,
lib/hexp/kramdown/converter.rb

Defined Under Namespace

Classes: Converter

Instance Method Summary collapse

Instance Method Details

#convert(document_or_element) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/hexp/kramdown.rb', line 6

def convert(document_or_element)
  Hexp::Kramdown::Converter.new.convert(
    if document_or_element.is_a? Kramdown::Document
      document_or_element.root
    else
      document_or_element
    end
  ).to_hexp
end