Class: Mspire::Mzml::ProcessingMethod

Inherits:
Object
  • Object
show all
Includes:
CV::Paramable
Defined in:
lib/mspire/mzml/processing_method.rb

Instance Attribute Summary collapse

Attributes included from CV::Paramable

#cv_params, #ref_param_groups, #user_params

Instance Method Summary collapse

Methods included from CV::Paramable

#accessionable_params, #describe!, #describe_many!, #fetch, #fetch_by_accession, #param?, #param_by_accession, #params, #params?

Constructor Details

#initialize(order, software, opts = {params: []}, &block) ⇒ ProcessingMethod

Returns a new instance of ProcessingMethod.



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

def initialize(order, software, opts={params: []}, &block)
  @order, @software = order, software
  super(opts)
  block.call(self) if block
end

Instance Attribute Details

#orderObject

Returns the value of attribute order.



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

def order
  @order
end

#softwareObject

Returns the value of attribute software.



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

def software
  @software
end

Instance Method Details

#to_xml(builder) ⇒ Object



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

def to_xml(builder)
  builder.processingMethod(order: @order, softwareRef: software.id) do |pm_n|
    super(pm_n) # params
  end
  builder
end