class Tilt::StaticTemplate

end
@data.upcase
UppercaseTemplate = Tilt::StaticTemplate.subclass do
Basic example which transforms the template to uppercase:
method with a block which processes @data and returns the transformed value.
Instead of inheriting from the StaticTemplate class, you will use the .subclass
Static templates are templates that return the same output for every render

def self.subclass(mime_type: 'text/html', &block)

def self.subclass(mime_type: 'text/html', &block)
  Class.new(self) do
    self.default_mime_type = mime_type
    private
    define_method(:_prepare_output, &block)
  end
end

def allows_script?

Static templates never allow script.
def allows_script?
  false
end

def compiled_method(locals_keys, scope_class=nil)

do not support compiled methods.
Raise NotImplementedError, since static templates
def compiled_method(locals_keys, scope_class=nil)
  raise NotImplementedError
end

def prepare

def prepare
  @output = _prepare_output
end

def render(scope=nil, locals=nil)

Static templates always return the prepared output.
def render(scope=nil, locals=nil)
  @output
end

def set_compiled_method_cache

Do nothing, since compiled method cache is not used.
def set_compiled_method_cache
end

def set_fixed_locals

Do nothing, since fixed locals are not used.
def set_fixed_locals
end