Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (20 sloc) 0.481 kB
require 'mustache'
require 'mustache/plugins/syntax_highlighter'
class Dude < Mustache
include Mustache::Plugins::SyntaxHighlighter
def name
"Chris"
end
end
Dude.template = <<template
<html><head>
<link href="http://pygments.org/media/pygments_style.css" media="screen" rel="stylesheet" type="text/css" />
</head><body><div class="syntax">
{{# highlight_ruby}}
def hello
puts "Hi {{name}}!"
end
{{/ highlight_ruby}}
</div></body></html>
template
puts Dude.render
Jump to Line
Something went wrong with that request. Please try again.