Method: Wrongdoc::Rdoc#add_atom
- Defined in:
- lib/wrongdoc/rdoc.rb
#add_atom(path, atom_uri) ⇒ Object
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/wrongdoc/rdoc.rb', line 38 def add_atom(path, atom_uri) File.open(path, "a+") do |fp| doc = parse_xml(fp.read) doc.search("title").each { |t| t.add_next_sibling(atom_node(doc, atom_uri)) } fp.truncate 0 fp.write doc.to_xhtml end end |