Sha256: ebf4429b1326b1c14c81511972d834024769cfcea33ee796f6895c3a51a4054f
Contents?: true
Size: 403 Bytes
Versions: 4
Compression:
Stored size: 403 Bytes
Contents
class Slide attr_accessor :text, :classes, :notes def initialize(text, *classes) @text = text @classes = classes @notes = nil extract_notes! end def html MakersMark::Generator.new(@text).to_html end private def extract_notes! @text.gsub!(/^!NOTES\s*(.*\n)$/m) do |note| @notes = note.to_s.chomp.gsub('!NOTES', '') '' end end end
Version data entries
4 entries across 4 versions & 3 rubygems
Version | Path |
---|---|
dancroak-slidedown-0.1.2 | lib/slide.rb |
nakajima-slidedown-0.1.1 | lib/slide.rb |
slidedown-0.2.0 | lib/slide.rb |
slidedown-0.1.1 | lib/slide.rb |