Sha256: 41e7f4db71bb020230eabf19d45b0b56ed966eae59bae7514a7a790c0352afc2

Contents?: true

Size: 598 Bytes

Versions: 214

Compression:

Stored size: 598 Bytes

Contents

$ erubis -l js example.ejs
var _buf = [];
   var user = 'Erubis';
   var list = ['<aaa>', 'b&b', '"ccc"'];
 
_buf.push("<html>\n\
 <body>\n\
  <p>Hello "); _buf.push(user); _buf.push("!</p>\n\
  <table>\n\
   <tbody>\n");
     var i; 
     for (i = 0; i < list.length; i++) { 
_buf.push("    <tr bgcolor=\""); _buf.push(i % 2 == 0 ? '#FFCCCC' : '#CCCCFF'); _buf.push("\">\n\
     <td>"); _buf.push(i + 1); _buf.push("</td>\n\
     <td>"); _buf.push(list[i]); _buf.push("</td>\n\
    </tr>\n");
     } 
_buf.push("   </tbody>\n\
  </table>\n\
 </body>\n\
</html>\n");
document.write(_buf.join(""));

Version data entries

214 entries across 188 versions & 44 rubygems

Version Path
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.6.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.6.2 vendor/bundle/ruby/2.6.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.6.1 vendor/bundle/ruby/2.6.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.6.0 vendor/bundle/ruby/2.6.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.6.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.6.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.2.0 vendor/bundle/ruby/2.5.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.2.0.0 vendor/bundle/ruby/2.5.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.1.4.0 vendor/bundle/ruby/2.5.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-unbundled-2.1.2.0 vendor/bundle/ruby/2.3.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/erubis-2.7.0/test/data/users-guide/example_js.result