require 'ms/cv/paramable' require 'ms/mzml/component' require 'ms/mzml/list' module MS class Mzml class InstrumentConfiguration include MS::CV::Paramable # (required) the id that this guy can be referenced from attr_accessor :id # a list of Source, Analyzer, Detector objects attr_accessor :components # a single software object associated with the instrument attr_accessor :software def initialize(id, components=[], opts={params: []}) describe!(*opts[:params]) @id = id @components = components end def to_xml(builder) builder.instrumentConfiguration(id: @id) do |inst_conf_n| super(builder) MS::Mzml::Component.list_xml(components, inst_conf_n) inst_conf_n.softwareRef(ref: @software.id) if @software end builder end self.extend(MS::Mzml::List) end end end