class PepXMLWriter
Constants
- PEPXML_NS
- PEPXML_NS_PREFIX
Attributes
template_doc[R]
Public Class Methods
new()
click to toggle source
# File lib/protk/pepxml_writer.rb, line 10 def initialize template_path="#{File.dirname(__FILE__)}/data/template_pep.xml" template_parser=XML::Parser.file(template_path) @template_doc=template_parser.parse end
Public Instance Methods
append_spectrum_query(query_node)
click to toggle source
# File lib/protk/pepxml_writer.rb, line 16 def append_spectrum_query(query_node) @template_doc.root << query_node end
save(file_path)
click to toggle source
# File lib/protk/pepxml_writer.rb, line 20 def save(file_path) @template_doc.save(file_path,:indent=>true,:encoding => XML::Encoding::UTF_8) end