Sha256: a99dbe3c46f942c1619a3d4842f797f4dfbed55488d3215493c3a92cd69446a8

Contents?: true

Size: 669 Bytes

Versions: 11

Compression:

Stored size: 669 Bytes

Contents

module MS
  class Mzml
    # Methods for simple List objects (scanList, instrumentConfigurationList,
    # etc.)
    module List
      def list_xml_element
        return @list_xml_element if @list_xml_element
        @list_xml_element = self.to_s.split('::').last << "List"
        @list_xml_element[0] = @list_xml_element[0].downcase
        @list_xml_element
      end

      def list_xml(objects, builder, tagname=nil)
        # InstrumentConfiguration -> instrumentConfigurationList
        builder.tag!(tagname || list_xml_element, count: objects.size) do |n|
          objects.each {|obj| obj.to_xml(n) }
        end
        builder
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mspire-0.6.26 lib/ms/mzml/list.rb
mspire-0.6.25 lib/ms/mzml/list.rb
mspire-0.6.24 lib/ms/mzml/list.rb
mspire-0.6.22 lib/ms/mzml/list.rb
mspire-0.6.21 lib/ms/mzml/list.rb
mspire-0.6.20 lib/ms/mzml/list.rb
mspire-0.6.19 lib/ms/mzml/list.rb
mspire-0.6.18 lib/ms/mzml/list.rb
mspire-0.6.12 lib/ms/mzml/list.rb
mspire-0.6.11 lib/ms/mzml/list.rb
mspire-0.6.9 lib/ms/mzml/list.rb