class Xomponent::Document

Constants

DOCTYPE

Attributes

head_inner[W]
script_content[W]
style_content[W]
title_content[W]

Public Instance Methods

head_content() click to toggle source
# File lib/Xomponent/Document.rb, line 12
def head_content
  title { @title_content } +
  style { @style_content } + (@head_inner || '')
end
method_missing(name, **args, &block) click to toggle source
# File lib/Xomponent/Document.rb, line 8
def method_missing(name, **args, &block)
  Element.new(name, args, &block)
end
render() click to toggle source
# File lib/Xomponent/Document.rb, line 17
def render
  DOCTYPE + html {
    head { head_content } +
    body {
      div(id: :app) +
      script { @script_content }
    }
  }
end