Module: Arbre::HTML
- Included in:
- ActiveAdmin::Renderer, Element
- Defined in:
- lib/active_admin/arbre/tag.rb,
lib/active_admin/arbre/html.rb,
lib/active_admin/arbre/element.rb,
lib/active_admin/arbre/document.rb,
lib/active_admin/arbre/text_node.rb,
lib/active_admin/arbre/attributes.rb,
lib/active_admin/arbre/class_list.rb,
lib/active_admin/arbre/collection.rb,
lib/active_admin/arbre/html5_elements.rb
Defined Under Namespace
Modules: BuilderMethods Classes: Attributes, ClassList, Collection, Document, Element, P, Table, Tag, TextNode
Constant Summary collapse
- AUTO_BUILD_ELEMENTS =
[ :a, :abbr, :address, :area, :article, :aside, :audio, :b, :base, :bdo, :blockquote, :body, :br, :button, :canvas, :caption, :cite, :code, :col, :colgroup, :command, :datalist, :dd, :del, :details, :dfn, :div, :dl, :dt, :em, :embed, :fieldset, :figcaption, :figure, :footer, :form, :h1, :h2, :h3, :h4, :h5, :h6, :head, :header, :hgroup, :hr, :html, :i, :iframe, :img, :input, :ins, :keygen, :kbd, :label, :legend, :li, :link, :map, :mark, :menu, :meta, :meter, :nav, :noscript, :object, :ol, :optgroup, :option, :output, :pre, :progress, :q, :s, :samp, :script, :section, :select, :small, :source, :span, :strong, :style, :sub, :summary, :sup, :table, :tbody, :td, :textarea, :tfoot, :th, :thead, :time, :title, :tr, :ul, :var, :video ]
- HTML5_ELEMENTS =
[ :p ] + AUTO_BUILD_ELEMENTS
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/active_admin/arbre/html.rb', line 12 def method_missing(name, *args, &block) if current_dom_context.respond_to?(name) current_dom_context.send name, *args, &block elsif assigns && assigns.has_key?(name) assigns[name] elsif helpers.respond_to?(name) helpers.send(name, *args, &block) else super end end |
Instance Method Details
#current_dom_context ⇒ Object
3 4 5 6 |
# File 'lib/active_admin/arbre/html.rb', line 3 def current_dom_context @__current_dom_element__ ||= Arbre::Context.new(assigns, helpers) @__current_dom_element__.current_dom_context end |
#helpers ⇒ Object
8 9 10 |
# File 'lib/active_admin/arbre/html.rb', line 8 def helpers @_helpers end |