def slideshow
    puts SLIDESHOW_START
    yield
    puts SLIDESHOW_END
end

def slide title
    puts "   
" puts "

#{ title }

" puts "
    " yield puts "
" puts "
" end def item text puts "
  • #{ text.htmlspecialchars }
  • " end SLIDESHOW_START = < ...
    END SLIDESHOW_END = < END class String def htmlspecialchars gsub('&', '&').gsub('<', '<').gsub('>', '>') end end slideshow { slide ("first slide") { item "a point" item "another point" } slide ("second slide") { item "an interesting point" item "an uninteresting point" } }