Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 27 lines (20 sloc) 0.481 kB
a60ee88 @defunkt first draft
authored
1 require 'mustache'
2 require 'mustache/plugins/syntax_highlighter'
3
4 class Dude < Mustache
5 include Mustache::Plugins::SyntaxHighlighter
6
7 def name
8 "Chris"
9 end
10 end
11
12 Dude.template = <<template
76f45f0 @defunkt include css in example
authored
13 <html><head>
14 <link href="http://pygments.org/media/pygments_style.css" media="screen" rel="stylesheet" type="text/css" />
15 </head><body><div class="syntax">
16
a60ee88 @defunkt first draft
authored
17 {{# highlight_ruby}}
18 def hello
19 puts "Hi {{name}}!"
20 end
21 {{/ highlight_ruby}}
76f45f0 @defunkt include css in example
authored
22
23 </div></body></html>
a60ee88 @defunkt first draft
authored
24 template
25
26 puts Dude.render
Something went wrong with that request. Please try again.