Class: Mspire::Mzml::Chromatogram

Inherits:
Object
  • Object
show all
Includes:
DataArrayContainerLike
Defined in:
lib/mspire/mzml/chromatogram.rb

Instance Attribute Summary collapse

Attributes included from DataArrayContainerLike

#data_arrays, #data_processing, #id, #index

Attributes included from CV::Paramable

#params

Instance Method Summary collapse

Methods included from DataArrayContainerLike

#default_array_length

Methods included from CV::Paramable

#describe!

Constructor Details

#initialize(*args, &block) ⇒ Chromatogram

Returns a new instance of Chromatogram.



15
16
17
18
# File 'lib/mspire/mzml/chromatogram.rb', line 15

def initialize(*args, &block)
  super(*args)
  block.call(self) if block
end

Instance Attribute Details

#precursorObject

(optional) precursor isolations to the chromatogram currently being described



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

def precursor
  @precursor
end

#productObject

(optional) Description of product isolation to the chromatogram



13
14
15
# File 'lib/mspire/mzml/chromatogram.rb', line 13

def product
  @product
end

Instance Method Details

#to_xml(builder, opts = {}) ⇒ Object

see SpectrumList for generating the entire list



21
22
23
24
25
26
# File 'lib/mspire/mzml/chromatogram.rb', line 21

def to_xml(builder, opts={})
  super(builder) do |node|
    @precursor.to_xml(node) if @precursor
    @product.to_xml(node) if @product
  end
end