public
Created

compiled_erb.rb

  • Download Gist
compiled_haml.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
begin;extend Haml::Helpers;_hamlout = @haml_buffer = Haml::Buffer.new(@haml_buffer, {:autoclose=>["meta", "img", "link", "br", "hr", "input", "area", "param", "col", "base"], :preserve=>["textarea", "pre", "code"], :attr_wrapper=>"'", :ugly=>true, :format=>:html5, :encoding=>"UTF-8", :escape_html=>false});_erbout = _hamlout.buffer;__in_erb_template = true;;_hamlout.buffer << "<!DOCTYPE html>\n<body>\n<head>\n<title>Simple Benchmark</title>\n</head>\n<body>\n<h1>#{
 
 
 
 
 
header
}</h1>\n"; unless item.empty?;
_hamlout.buffer << "<ul>\n";
for i in item;
if i[:current];
_hamlout.buffer << "<li>\n<strong>#{
i[:name]
}</strong>\n</li>\n"; else;
_hamlout.buffer << "<li>\n";
_hamlout.open_tag("a", false, true, false, false, {}, false, false, nil, nil, :href => i[:url]);_hamlout.buffer << "#{i[:name]
}</a>\n</li>\n";end;end;_hamlout.buffer << "</ul>\n"; else;
_hamlout.buffer << "<p>The list is empty.</p>\n";end;_hamlout.buffer << "</body>\n</body>\n";_erbout;ensure;@haml_buffer = @haml_buffer.upper;end;
compiled_slim.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
_buf = [] ; _buf << ("<!DOCTYPE html><body><head><title>Simple Benchmark</title></head><body><h1>"\
""\
""\
""\
""\
""\
"#{header}"\
"</h1>") ; unless item.empty? ;
; _buf << ("<ul>") ;
; for i in item ;
; if i[:current] ;
; _buf << ("<li><strong>"\
"#{i[:name]}"\
"</strong></li>") ; else ;
; _buf << ("<li><a href=\""\
"#{Slim::Helpers.escape_html((i[:url]))}\">#{i[:name]}"\
"</a></li>") ; end ; end ; _buf << ("</ul>") ; else ;
; _buf << ("<p>The list is empty.</p>") ;
; end ; _buf << ("</body></body>") ; _buf = _buf.join
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#coding:UTF-8
_erbout = ''; _erbout.concat "<!DOCTYPE HTML>\n\n<html>\n <head>\n <title>Simple Benchmark</title>\n </head>\n <body>\n <h1>"
 
 
 
 
 
 
; _erbout.concat(( header ).to_s); _erbout.concat "</h1>\n "
; unless item.empty? ; _erbout.concat "\n <ul>\n "
 
; for i in item ; _erbout.concat "\n "
; if i[:current] ; _erbout.concat "\n <li><strong>"
; _erbout.concat(( i[:name] ).to_s); _erbout.concat "</strong></li>\n "
; else ; _erbout.concat "\n <li><a href=\""
; _erbout.concat(( i[:url] ).to_s); _erbout.concat "\">"; _erbout.concat(( i[:name] ).to_s); _erbout.concat "</a></li>\n "
; end ; _erbout.concat "\n "
; end ; _erbout.concat "\n </ul>\n "
 
; else ; _erbout.concat "\n <p>The list is empty.</p>\n "
 
; end ; _erbout.concat "\n </body>\n</html>"
 
; _erbout.force_encoding(__ENCODING__)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.