Class: Arbre::HTML::Document

Inherits:
Tag show all
Defined in:
lib/active_admin/arbre/document.rb

Direct Known Subclasses

ActiveAdmin::Views::Pages::Base

Constant Summary

Constants included from Arbre::HTML

AUTO_BUILD_ELEMENTS, HTML5_ELEMENTS

Instance Attribute Summary

Attributes inherited from Tag

#attributes

Attributes inherited from Element

#children, #parent

Instance Method Summary collapse

Methods inherited from Tag

#add_class, #class_list, #class_names, #get_attribute, #has_attribute?, #id, #id!, #id=, #initialize, #remove_attribute, #remove_class, #set_attribute

Methods inherited from Element

#+, #<<, #add_child, #assigns, builder_method, #content, #content=, #each, #get_elements_by_tag_name, #helpers, #html_safe, #indent_level, #initialize, #parent?, #remove_child, #to_ary, #to_s, #to_str

Methods included from BuilderMethods

#build_tag, #current_dom_context, #insert_tag, #insert_text_node_if_string, #with_current_dom_context

Methods included from Arbre::HTML

#current_dom_context, #helpers, #method_missing

Constructor Details

This class inherits a constructor from Arbre::HTML::Tag

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Arbre::HTML

Instance Method Details

#build(*args) ⇒ Object



6
7
8
9
10
# File 'lib/active_admin/arbre/document.rb', line 6

def build(*args)
  super
  build_head
  build_body
end

#doctypeObject



20
21
22
# File 'lib/active_admin/arbre/document.rb', line 20

def doctype
  '<!DOCTYPE html>'.html_safe
end

#documentObject



12
13
14
# File 'lib/active_admin/arbre/document.rb', line 12

def document
  self
end

#tag_nameObject



16
17
18
# File 'lib/active_admin/arbre/document.rb', line 16

def tag_name
  'html'
end

#to_htmlObject



24
25
26
# File 'lib/active_admin/arbre/document.rb', line 24

def to_html
  doctype + super
end