Class: Mspire::Mzml::ChromatogramList

Inherits:
Array
  • Object
show all
Defined in:
lib/mspire/mzml/chromatogram_list.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Array

#in_groups

Constructor Details

#initialize(default_data_processing, chromatograms = []) ⇒ ChromatogramList

Returns a new instance of ChromatogramList.



10
11
12
13
# File 'lib/mspire/mzml/chromatogram_list.rb', line 10

def initialize(default_data_processing, chromatograms=[])
  @default_data_processing = default_data_processing
  super(chromatograms)
end

Instance Attribute Details

#default_data_processingObject (readonly)

a DataProcessing object



8
9
10
# File 'lib/mspire/mzml/chromatogram_list.rb', line 8

def default_data_processing
  @default_data_processing
end

Instance Method Details

#to_xml(builder) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/mspire/mzml/chromatogram_list.rb', line 15

def to_xml(builder)
  builder.chromatogramList(count: self.size, defaultDataProcessingRef: @default_data_processing.id) do |chrl_n|
    self.each do |chromatogram|
      chromatogram.to_xml(chrl_n)
    end
  end
  builder
end