Method: Erector::Element#empty_element

Defined in:
lib/erector/element.rb

#empty_element(*args, &block) ⇒ Object

Internal method used to emit a self-closing HTML/XML element, including a tag name and optional attributes (passed in via the default hash).

Using the arcane powers of Ruby, there are magic methods that call empty_element for all the standard HTML tags, like img, br, and so forth. Look at the source of #self_closing_tags for the full list. Unfortunately, this big mojo confuses rdoc, so we can’t see each method in this rdoc page, but trust us, they’re there.



38
39
40
# File 'lib/erector/element.rb', line 38

def empty_element(*args, &block)
  _empty_element(*args, &block)
end