Class: Metanorma::Standoc::FormInputMacro
- Inherits:
-
Asciidoctor::Extensions::InlineMacroProcessor
- Object
- Asciidoctor::Extensions::InlineMacroProcessor
- Metanorma::Standoc::FormInputMacro
- Defined in:
- lib/metanorma/standoc/macros_form.rb
Instance Method Summary collapse
Instance Method Details
#process(_parent, target, attr) ⇒ Object
7 8 9 10 11 |
# File 'lib/metanorma/standoc/macros_form.rb', line 7 def process(_parent, target, attr) m = %w(id name value disabled readonly checked maxlength minlength) .map { |a| attr[a] ? " #{a}='#{attr[a]}'" : nil }.compact %{<input type='#{target}' #{m.join}/>} end |