class Phlex::HTML
@abstract Subclass and define {#template} to create an HTML component class.
def __unbuffered_class__
- Api: - private
def __unbuffered_class__ UNBUFFERED_MUTEX.synchronize do if defined? @unbuffered_class @unbuffered_class else @unbuffered_class = Class.new(Unbuffered) end end end
def content_type
def content_type "text/html" end
def doctype
def doctype context = @_context return if context.fragments && !context.in_target_fragment context.buffer << "<!DOCTYPE html>" nil end
def filename
def filename nil end
def svg(...)
- See: https://developer.mozilla.org/docs/Web/SVG/Element/svg -
Returns:
-
(nil)
-
def svg(...) super do render Phlex::SVG.new do |svg| yield(svg) end end end
def unbuffered
- Api: - private
def unbuffered self.class.__unbuffered_class__.new(self) end