Method: IsoDoc::PresentationXMLConvert#ruby1

Defined in:
lib/isodoc/presentation_function/inline.rb

#ruby1(elem) ⇒ Object



216
217
218
219
220
221
222
223
# File 'lib/isodoc/presentation_function/inline.rb', line 216

def ruby1(elem)
  v = elem.at(ns("./pronunciation | ./annotation")).remove
  elem.xpath(ns("./ruby")).each do |r|
    ruby1(r)
  end
  t = elem.children.to_xml
  elem.replace("<ruby><rb>#{t}</rb><rt>#{v['value']}</rt></ruby>")
end