Class: Arbre::HTML::Document
- Defined in:
- lib/active_admin/arbre/document.rb
Direct Known Subclasses
Constant Summary
Constants included from Arbre::HTML
AUTO_BUILD_ELEMENTS, HTML5_ELEMENTS
Instance Attribute Summary
Attributes inherited from Tag
Attributes inherited from Element
Instance Method Summary collapse
- #build(*args) ⇒ Object
- #build_body ⇒ Object protected
- #build_head ⇒ Object protected
- #doctype ⇒ Object
- #document ⇒ Object
- #tag_name ⇒ Object
- #to_html ⇒ Object
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 |
#build_body ⇒ Object (protected)
36 37 38 |
# File 'lib/active_admin/arbre/document.rb', line 36 def build_body @body = body end |
#build_head ⇒ Object (protected)
30 31 32 33 34 |
# File 'lib/active_admin/arbre/document.rb', line 30 def build_head @head = head do :"http-equiv" => "Content-type", :content => "text/html; charset=utf-8" end end |
#doctype ⇒ Object
20 21 22 |
# File 'lib/active_admin/arbre/document.rb', line 20 def doctype '<!DOCTYPE html>'.html_safe end |
#document ⇒ Object
12 13 14 |
# File 'lib/active_admin/arbre/document.rb', line 12 def document self end |
#tag_name ⇒ Object
16 17 18 |
# File 'lib/active_admin/arbre/document.rb', line 16 def tag_name 'html' end |
#to_html ⇒ Object
24 25 26 |
# File 'lib/active_admin/arbre/document.rb', line 24 def to_html doctype + super end |