Class: Arbre::Context

Inherits:
HTML::Element show all
Defined in:
lib/active_admin/arbre/context.rb

Constant Summary

Constants included from HTML

HTML::AUTO_BUILD_ELEMENTS, HTML::HTML5_ELEMENTS

Instance Attribute Summary

Attributes inherited from HTML::Element

#children, #parent

Instance Method Summary collapse

Methods inherited from HTML::Element

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

Methods included from HTML::BuilderMethods

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

Methods included from HTML

#current_dom_context, #helpers, #method_missing

Constructor Details

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

Dynamic Method Handling

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

Instance Method Details

#indent_levelObject



3
4
5
6
# File 'lib/active_admin/arbre/context.rb', line 3

def indent_level
  # A context does not increment the indent_level
  super - 1
end

#lengthObject Also known as: bytesize



8
9
10
# File 'lib/active_admin/arbre/context.rb', line 8

def length
  to_html.length
end