Class: Mspire::Mzml::DataProcessing

Inherits:
Object
  • Object
show all
Extended by:
List
Defined in:
lib/mspire/mzml/data_processing.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from List

list_xml, list_xml_element

Constructor Details

#initialize(id, processing_methods = [], &block) ⇒ DataProcessing

yields self if given a block



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

def initialize(id, processing_methods=[], &block)
  @id, @processing_methods = id, processing_methods
  block.call(self) if block
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/mspire/mzml/data_processing.rb', line 7

def id
  @id
end

#processing_methodsObject

Returns the value of attribute processing_methods.



7
8
9
# File 'lib/mspire/mzml/data_processing.rb', line 7

def processing_methods
  @processing_methods
end

Instance Method Details

#to_xml(builder) ⇒ Object



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

def to_xml(builder)
  builder.dataProcessing( id: @id ) do |dp_n|
    processing_methods.each do |proc_method|
      proc_method.to_xml(dp_n)
    end
  end
  builder
end