Module: DHTML
- Includes:
- Document
- Defined in:
- lib/dhtml.rb,
lib/dhtml/version.rb,
lib/dhtml/document.rb
Overview
Defined Under Namespace
Modules: Document
Constant Summary collapse
- VOID_TAGS =
List of tags that do not require a closing tag.
%i[area audio base br col hr img input link meta param picture source video]
- VERSION =
The gem’s semantic version number.
'0.1.3'
Constants included from Document
Document::ESCAPE_HTML, Document::ESCAPE_HTML_PATTERN
Instance Attribute Summary
Attributes included from Document
Class Method Summary collapse
-
.alias_method(tag, _) ⇒ Symbol
Opal does not support __callee__, so #alias_method is being overridden to provide implementation sufficient for this module.
Instance Method Summary collapse
Methods included from Document
#attributes=, #doctype, #document, #finish, #html_attribute, #html_attributes, #html_escape, #read_html, #reset, #write_html_element, #write_html_tag
Class Method Details
.alias_method(tag, _) ⇒ Symbol
Opal does not support __callee__, so #alias_method is being overridden to provide implementation sufficient for this module.
31 32 33 34 35 |
# File 'lib/dhtml.rb', line 31 def self.alias_method(tag, _) define_method(tag) do |**attributes, &block| write_html_tag(tag: tag, **attributes, &block) end end |
Instance Method Details
#void?(tag) ⇒ TrueClass, FalseClass
20 21 22 |
# File 'lib/dhtml.rb', line 20 def void?(tag) VOID_TAGS.include?(tag) end |