Module: YART::Parser
- Included in:
- YART
- Defined in:
- lib/yart/parser.rb
Constant Summary collapse
- CUSTOM_ATTRIBUTES =
[:close].freeze
Instance Method Summary collapse
- #br(**attributes, &block) ⇒ Object
-
#doctype ⇒ Object
Renders a element, for convenience.
-
#element(name, **attributes, &block) ⇒ Object
Renders an element with the raw name (case insensitive).
-
#javascript(src = nil, &block) ⇒ Object
Renders a JS
Allows elements to be called and rendered via a DSL.
17 18 19 20 21
# File 'lib/yart/parser.rb', line 17 def method_missing(m, *args, &block) attributes = args.fetch(0, {}) element(m, **attributes, &block) end