Module: Hexp::Kramdown

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

Defined Under Namespace

Classes: Converter

Class Method Summary collapse

Class Method Details

.convert(document_or_element) ⇒ Object



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

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