Class: Arbre::HTML::Table

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

Direct Known Subclasses

ActiveAdmin::Views::TableFor

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, #build, #class_list, #class_names, #get_attribute, #has_attribute?, #id, #id!, #id=, #remove_attribute, #remove_class, #set_attribute, #to_html

Methods inherited from Element

#+, #<<, #add_child, #assigns, #build, builder_method, #content, #content=, #document, #each, #get_elements_by_tag_name, #helpers, #html_safe, #indent_level, #parent?, #remove_child, #tag_name, #to_ary, #to_html, #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

#initializeTable

Returns a new instance of Table.



31
32
33
34
# File 'lib/active_admin/arbre/html5_elements.rb', line 31

def initialize(*)
  super
  set_table_tag_defaults
end

Dynamic Method Handling

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

Instance Method Details

#set_table_tag_defaultsObject (protected)

Set some good defaults for tables



39
40
41
42
43
# File 'lib/active_admin/arbre/html5_elements.rb', line 39

def set_table_tag_defaults
  set_attribute :border,      0
  set_attribute :cellspacing, 0
  set_attribute :cellpadding, 0
end