require 'pandoc-ruby' module WriteDown module Model class Slide < Base def render template = File.expand_path('../erb/slide.erb', __FILE__) html_string = ERB.new(File.read(template)).result(binding) end def body PandocRuby.convert(@content, { f: :org, to: :html5}, 'no-highlight') end def build output = Pathname.new(@target_file) output.dirname.mkpath final_content = render output.write(final_content) self end end end end