module DHTML
@since 0.1.0
Constants
- VERSION
The gem's semantic version number.
@see semver.org/spec/v2.0.0.html @type [String]
- VOID_TAGS
List of tags that do not require a closing tag.
@type [Array<Symbol>] @since 0.1.0
Public Class Methods
alias_method(tag, _)
click to toggle source
Opal does not support __callee__, so alias_method is being overridden to provide implementation sufficient for this module.
@param [Symbol] tag @return [Symbol] The name of the aliased method. @since 0.1.0
# 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
Public Instance Methods
void?(tag)
click to toggle source
@param [Symbol] tag @return [TrueClass, FalseClass] @since 0.1.0
# File lib/dhtml.rb, line 20 def void?(tag) VOID_TAGS.include?(tag) end