class Eskimo::HTML::Html

Public Class Methods

new(doctype: 'html', **) click to toggle source
Calls superclass method Eskimo::HTML::Component::new
# File lib/eskimo/html/components/html.rb, line 5
def initialize(doctype: 'html', **)
  @doctype = doctype
  @tag_name = 'html'
  super
  @attributes.delete(:doctype)
end

Public Instance Methods

render(**) click to toggle source
Calls superclass method Eskimo::HTML::Component#render
# File lib/eskimo/html/components/html.rb, line 12
def render(**)
  if @doctype.to_s.empty?
    super
  else
    "<!DOCTYPE #{@doctype}>\n" + super
  end
end