Module: Mspire::Mzml::Component
- Includes:
- CV::Paramable
- Defined in:
- lib/mspire/mzml/component.rb
Overview
order is not an intrinsic property of this object, so it
Instance Attribute Summary
Attributes included from CV::Paramable
#cv_params, #ref_param_groups, #user_params
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Object
using custom list_xml, so no extend Mspire::Mzml::List.
- #to_xml(builder, order) ⇒ Object
Methods included from CV::Paramable
#accessionable_params, #describe!, #describe_from_xml!, #describe_many!, #describe_self_from_xml!, #each_accessionable_param, #each_param, #fetch, #fetch_by_accession, #param?, #param_by_accession, #params, #params?, #reject!, #replace!, #replace_many!
Class Method Details
.list_xml(components, builder) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/mspire/mzml/component.rb', line 25 def self.list_xml(components, builder) builder.componentList(count: components.size) do |xml_n| components.each_with_index do |component, order| component.to_xml(xml_n, order) end end end |
Instance Method Details
#initialize {|_self| ... } ⇒ Object
using custom list_xml, so no extend Mspire::Mzml::List
11 12 13 14 |
# File 'lib/mspire/mzml/component.rb', line 11 def initialize params_init yield(self) if block_given? end |
#to_xml(builder, order) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/mspire/mzml/component.rb', line 16 def to_xml(builder, order) klass = self.class.to_s.split('::').last klass[0] = klass[0].downcase builder.tag!(klass, order: order) do |c_n| super(c_n) end builder end |