Class: Mspire::Mzml::ScanList
- Includes:
- CV::Paramable
- Defined in:
- lib/mspire/mzml/scan_list.rb
Overview
MUST supply a child term of MS:1000570 (spectra combination) only once
e.g.: MS:1000571 (sum of spectra)
e.g.: MS:1000573 (median of spectra)
e.g.: MS:1000575 (mean of spectra)
e.g.: MS:1000795 (no combination)
Instance Attribute Summary
Attributes included from CV::Paramable
Instance Method Summary collapse
-
#initialize(opts = {params: []}, &block) ⇒ ScanList
constructor
A new instance of ScanList.
- #to_xml(builder) ⇒ Object (also: #list_xml)
Methods included from CV::Paramable
Methods inherited from Array
Constructor Details
#initialize(opts = {params: []}, &block) ⇒ ScanList
Returns a new instance of ScanList.
15 16 17 18 |
# File 'lib/mspire/mzml/scan_list.rb', line 15 def initialize(opts={params: []}, &block) describe!(*opts[:params]) block.call(self) if block end |
Instance Method Details
#to_xml(builder) ⇒ Object Also known as: list_xml
20 21 22 23 24 25 26 27 28 |
# File 'lib/mspire/mzml/scan_list.rb', line 20 def to_xml(builder) builder.scanList(count: self.size) do |sl_n| @params.each {|param| param.to_xml(sl_n) } if @params self.each do |scan| scan.to_xml(sl_n) end end builder end |