Module: IsoDoc::Function::Terms
- Included in:
- Common
- Defined in:
- lib/isodoc/function/terms.rb
Instance Method Summary collapse
- #admitted_term_parse(node, out) ⇒ Object
- #definition_parse(node, out) ⇒ Object
- #deprecated_term_parse(node, out) ⇒ Object
- #modification_parse(node, out) ⇒ Object
- #para_then_remainder(first, node, p, div) ⇒ Object
- #term_parse(node, out) ⇒ Object
- #termdef_parse(node, out) ⇒ Object
- #termdocsource_parse(_node, _out) ⇒ Object
- #termnote_parse(node, out) ⇒ Object
- #termref_parse(node, out) ⇒ Object
Instance Method Details
#admitted_term_parse(node, out) ⇒ Object
21 22 23 24 25 |
# File 'lib/isodoc/function/terms.rb', line 21 def admitted_term_parse(node, out) out.p **{ class: "AltTerms", style:"text-align:left;" } do |p| node.children.each { |c| parse(c, p) } end end |
#definition_parse(node, out) ⇒ Object
4 5 6 |
# File 'lib/isodoc/function/terms.rb', line 4 def definition_parse(node, out) node.children.each { |n| parse(n, out) } end |
#deprecated_term_parse(node, out) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/isodoc/function/terms.rb', line 14 def deprecated_term_parse(node, out) out.p **{ class: "DeprecatedTerms", style:"text-align:left;" } do |p| p << l10n("#{@deprecated_lbl}: ") node.children.each { |c| parse(c, p) } end end |
#modification_parse(node, out) ⇒ Object
8 9 10 11 12 |
# File 'lib/isodoc/function/terms.rb', line 8 def modification_parse(node, out) out << "[MODIFICATION]" para = node.at(ns("./p")) para.children.each { |n| parse(n, out) } end |
#para_then_remainder(first, node, p, div) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/isodoc/function/terms.rb', line 33 def para_then_remainder(first, node, p, div) if first.name == "p" first.children.each { |n| parse(n, p) } node.elements.drop(1).each { |n| parse(n, div) } else node.elements.each { |n| parse(n, div) } end end |
#term_parse(node, out) ⇒ Object
27 28 29 30 31 |
# File 'lib/isodoc/function/terms.rb', line 27 def term_parse(node, out) out.p **{ class: "Terms", style:"text-align:left;" } do |p| node.children.each { |c| parse(c, p) } end end |
#termdef_parse(node, out) ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/isodoc/function/terms.rb', line 60 def termdef_parse(node, out) out.p **{ class: "TermNum", id: node["id"] } do |p| p << "#{get_anchors[node["id"]][:label]}#{clausedelim}" end set_termdomain("") node.children.each { |n| parse(n, out) } end |
#termdocsource_parse(_node, _out) ⇒ Object
68 69 |
# File 'lib/isodoc/function/terms.rb', line 68 def termdocsource_parse(_node, _out) end |
#termnote_parse(node, out) ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/isodoc/function/terms.rb', line 42 def termnote_parse(node, out) out.div **{ class: "Note" } do |div| first = node.first_element_child div.p do |p| p << "#{anchor(node['id'], :label) || '???'}: " para_then_remainder(first, node, p, div) end end end |
#termref_parse(node, out) ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/isodoc/function/terms.rb', line 52 def termref_parse(node, out) out.p do |p| p << "[TERMREF]" node.children.each { |n| parse(n, p) } p << "[/TERMREF]" end end |