Class: Arbre::Rails::LegacyDocument
- Inherits:
-
Html::Document
- Object
- Element
- Html::Tag
- Html::Document
- Arbre::Rails::LegacyDocument
- Defined in:
- lib/arbre/rails/legacy_document.rb
Overview
This document adds “legacy” ActionView content to the right places.
Instance Attribute Summary
Attributes inherited from Html::Tag
Instance Method Summary collapse
Methods inherited from Html::Document
#body, #doctype, #head, #initialize, #tag_name, #title, #title=
Methods inherited from Html::Tag
#[], #[]=, #add_class, attribute, classes, #classes, #classes=, #empty?, #generate_id!, #has_attribute?, #has_class?, id, #initialize, #inspect, #one_line?, #remove_class, #self_closing_tag?, tag, #tag_classes, #tag_id, #tag_name
Methods inherited from Element
#+, #<<, #ancestors, #arbre_context, #assigns, #children, #content, #content=, #descendants, #empty?, #has_children?, #helpers, #indent_level, #initialize, #inspect, #orphan?, #parent, #parent=, #remove!, #respond_to?, #to_html
Methods included from Html::Querying
#child_tags, #descendant_tags, #find, #find_by_classes, #find_by_id, #find_by_tag, #find_by_tag_and_classes, #find_first
Methods included from Element::Building
#append_within, #build, #current_element, #current_flow, included, #insert, #insert_child, #prepend_within, #temporary
Constructor Details
This class inherits a constructor from Arbre::Html::Document
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Arbre::Element
Instance Method Details
#build! ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/arbre/rails/legacy_document.rb', line 7 def build! super head do text_node helpers.content_for(:head) end body do text_node helpers.content_for(:layout) end end |
#to_s ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/arbre/rails/legacy_document.rb', line 18 def to_s if request.xhr? body.content else super end end |