Class: Arbo::HTML::Document
- Defined in:
- lib/arbo/html/document.rb
Constant Summary
Constants inherited from Tag
Instance Attribute Summary
Attributes inherited from Tag
Attributes inherited from Element
#arbo_context, #children, #parent
Instance Method Summary collapse
- #doctype ⇒ Object
- #document ⇒ Object
- #render_in(context = arbo_context) ⇒ Object
- #tag_name ⇒ Object
- #to_s ⇒ Object
Methods inherited from Tag
#add_class, #build, #class_list, #class_names, #extract_arguments, #get_attribute, #has_attribute?, #id, #id!, #id=, #initialize, #remove_attribute, #remove_class, #set_attribute
Methods inherited from Element
#+, #<<, #add_child, #ancestors, #assigns, #build, #children?, #content, #content=, #each, #find_first_ancestor, #get_elements_by_class_name, #get_elements_by_tag_name, #helpers, #html_safe, #indent_level, #initialize, #inspect, #parent?, #remove_child, #render_in_or_to_s, #to_ary, #to_str
Methods included from Element::BuilderMethods
#build_tag, #current_arbo_element, included, #insert_tag, #with_current_arbo_element
Constructor Details
This class inherits a constructor from Arbo::HTML::Tag
Instance Method Details
#doctype ⇒ Object
14 15 16 |
# File 'lib/arbo/html/document.rb', line 14 def doctype '<!DOCTYPE html>'.html_safe end |
#document ⇒ Object
6 7 8 |
# File 'lib/arbo/html/document.rb', line 6 def document self end |
#render_in(context = arbo_context) ⇒ Object
22 23 24 25 26 |
# File 'lib/arbo/html/document.rb', line 22 def render_in(context = arbo_context) context.output_buffer << doctype super context.output_buffer end |
#tag_name ⇒ Object
10 11 12 |
# File 'lib/arbo/html/document.rb', line 10 def tag_name 'html' end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/arbo/html/document.rb', line 18 def to_s doctype + super end |