require 'pandoc-ruby' module WriteDown module Converter # 基类, 定义了一些接口 class Markdown < Base def initialize(model) @content = model.content end def render PandocRuby.convert(@content, { f: :markdown, to: :html5}, 'no-highlight').to_s end end end end