class Mspire::Mzml::ReferenceableParamGroup
need to call to_xml_definition
(or use Mspire::Mzml::ReferenceableParamGroupList.list_xml) to get the xml for the object itself (and not a reference). Merely callying to_xml
will result in a referenceableParamGroupRef being created.
Attributes
id[RW]
Public Class Methods
from_xml(xml)
click to toggle source
# File lib/mspire/mzml/referenceable_param_group.rb, line 33 def self.from_xml(xml) obj = self.new(xml[:id]) obj.describe_from_xml!(xml) obj end
list_xml(objs, builder)
click to toggle source
# File lib/mspire/mzml/referenceable_param_group.rb, line 39 def self.list_xml(objs, builder) builder.referenceableParamGroupList(count: objs.size) do |rpgl_n| objs.each {|obj| obj.to_xml_definition(rpgl_n) } end builder end
new(id) { |self| ... }
click to toggle source
# File lib/mspire/mzml/referenceable_param_group.rb, line 15 def initialize(id) @id = id params_init yield(self) if block_given? end
Public Instance Methods
to_xml(builder)
click to toggle source
# File lib/mspire/mzml/referenceable_param_group.rb, line 21 def to_xml(builder) builder.referenceableParamGroupRef(ref: @id) builder end
to_xml_definition(builder)
click to toggle source
# File lib/mspire/mzml/referenceable_param_group.rb, line 26 def to_xml_definition(builder) builder.referenceableParamGroup(id: @id) do |fc_n| params.each {|obj| obj.to_xml(fc_n) } end builder end