Class: RERB::IIFETemplater

Inherits:
Templater show all
Defined in:
lib/rerb/templater.rb

Constant Summary collapse

TEMPLATE =
<<~TMPL.chomp
  <html>
    <head>
      <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/browser.script.iife.js"></script>
      <script type="text/ruby">
        require 'js'

  <%= content.gsub(/^(?!$)/, '  ' * 3) %>
      </script>
    </head>
    <body>
      <div id="<%= @root_name %>"></div>
    </body>
  </html>
TMPL

Method Summary

Methods inherited from Templater

#generate, #initialize

Constructor Details

This class inherits a constructor from RERB::Templater