class Revealize::MarkdownSlide::Slide
Attributes
rendered_markdown[R]
Public Instance Methods
content_without_preamble()
click to toggle source
# File lib/revealize/slide.rb, line 28 def content_without_preamble return raw_content unless raw_content.start_with?("---") raw_content = self.raw_content.sub("---\n", '') pre_amble, content = raw_content.split("---\n") @options = YAML.load(pre_amble) return content end
render()
click to toggle source
# File lib/revealize/slide.rb, line 19 def render render_markdown Haml::Engine.new("%section#{section_options}\n =rendered_markdown").render(self) end
render_markdown()
click to toggle source
# File lib/revealize/slide.rb, line 24 def render_markdown @rendered_markdown = Kramdown::Document.new(content_without_preamble, :auto_ids => false).to_html end
section_options()
click to toggle source
# File lib/revealize/slide.rb, line 36 def section_options return '' unless @options return %Q{(#{@options.to_a.map {|option| "data-#{ option.first }='#{option.last}'" }.join(' ')})} end