class Ms::Ident::Pepxml::MsmsPipelineAnalysis
Constants
- PEPXML_VERSION
the only additions concerning a writer are from v18 are to the ‘spectrum’: retention_time_sec and activationMethodType
- XMLNS
- XMLNS_XSI
- XSI_SCHEMA_LOCATION_BASE
(this doesn’t actually exist), also, the space is supposed to be there
Attributes
date[W]
msms_run_summary[RW]
pepxml_version[RW]
an Integer
summary_xml[RW]
self referential path to the outputfile
xmlns[RW]
include SpecIDXML
Version 1.2.3
attr_writer :date attr_writer :xmlns, :xmlns_xsi, :xsi_schemaLocation attr_accessor :summary_xml
xmlns_xsi[RW]
xsi_schema_location[RW]
Public Class Methods
new(hash={}, &block)
click to toggle source
if block given, yields a new msms_run_summary
to return value of block
# File lib/ms/ident/pepxml/msms_pipeline_analysis.rb, line 39 def initialize(hash={}, &block) @xmlns = XMLNS @xmlns_xsi = XMLNS_XSI @xsi_schema_location = xsi_schema_location @pepxml_version = PEPXML_VERSION merge!(hash, &block) end
Public Instance Methods
block_arg()
click to toggle source
# File lib/ms/ident/pepxml/msms_pipeline_analysis.rb, line 34 def block_arg @msms_run_summary = Ms::Ident::Pepxml::MsmsRunSummary.new end
date()
click to toggle source
if no date string given, then it will set to Time.now
# File lib/ms/ident/pepxml/msms_pipeline_analysis.rb, line 53 def date return @date if @date tarr = Time.now.to_a tarr[3..5].reverse.join('-') + "T#{tarr[0..2].reverse.join(':')}" end
to_xml(builder)
click to toggle source
uses the filename as summary_xml
(if it is nil) attribute and builds a complete, valid xml document, writing it to the filename
# File lib/ms/ident/pepxml/msms_pipeline_analysis.rb, line 61 def to_xml(builder) xmlb = builder || Nokogiri::XML::Builder.new xmlb.msms_pipeline_analysis(:date => date, :xmlns => xmlns, 'xsi:schemaLocation'.to_sym => xsi_schema_location, :summary_xml => summary_xml) do |xmlb| msms_run_summary.to_xml(xmlb) if msms_run_summary end builder || xmlb.doc.root.to_xml end