Class: Trickster::Renderer::BulletsRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/trickster/renderer/bullets_renderer.rb

Instance Method Summary collapse

Instance Method Details

#render(io, content, options) ⇒ Object



4
5
6
7
8
9
# File 'lib/trickster/renderer/bullets_renderer.rb', line 4

def render(io,content,options)
  io.puts "<h1>#{content[0]}</h1>"
  io.puts "<ul>"
  io.puts((content[1..-1].map { |_| "<li>" + _.gsub(/^[*+-o] /,'') + "</li>\n" }).join(""))
  io.puts "</ul>"
end