Class: Metanorma::Standoc::FormSelectMacro
- Inherits:
-
Asciidoctor::Extensions::InlineMacroProcessor
- Object
- Asciidoctor::Extensions::InlineMacroProcessor
- Metanorma::Standoc::FormSelectMacro
- Defined in:
- lib/metanorma/standoc/macros_form.rb
Instance Method Summary collapse
Instance Method Details
#process(parent, _target, attr) ⇒ Object
42 43 44 45 46 47 |
# File 'lib/metanorma/standoc/macros_form.rb', line 42 def process(parent, _target, attr) m = %w(id name size disabled multiple value) .map { |a| attr[a] ? " #{a}='#{attr[a]}'" : nil }.compact out = Asciidoctor::Inline.new(parent, :quoted, attr["text"]).convert %{<select #{m.join}>#{out}</select>} end |