module Mspire::Mzml::Component

order is not an intrinsic property of this object, so it

Public Class Methods

list_xml(components, builder) click to toggle source
# 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
new() { |self| ... } click to toggle source

using custom list_xml, so no extend Mspire::Mzml::List

# File lib/mspire/mzml/component.rb, line 11
def initialize
  params_init
  yield(self) if block_given?
end

Public Instance Methods

to_xml(builder, order) click to toggle source
Calls superclass method Mspire::Paramable#to_xml
# 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