Class: Mspire::Mzml::Software
- Inherits:
-
Object
- Object
- Mspire::Mzml::Software
- Extended by:
- List
- Includes:
- CV::Paramable
- Defined in:
- lib/mspire/mzml/software.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes included from CV::Paramable
Instance Method Summary collapse
-
#initialize(id = 'mspire', version = Mspire::VERSION, opts = {params: []}, &block) ⇒ Software
constructor
A new instance of Software.
- #to_xml(builder) ⇒ Object
Methods included from List
Methods included from CV::Paramable
#describe!, #describe_many!, #find_param_by_accession, #find_param_value_by_accession, #param_exists_by_accession?
Constructor Details
#initialize(id = 'mspire', version = Mspire::VERSION, opts = {params: []}, &block) ⇒ Software
Returns a new instance of Software.
12 13 14 15 16 |
# File 'lib/mspire/mzml/software.rb', line 12 def initialize(id='mspire', version=Mspire::VERSION, opts={params: []}, &block) @id, @version = id, version describe_many!(opts[:params]) block.call(self) if block end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
10 11 12 |
# File 'lib/mspire/mzml/software.rb', line 10 def id @id end |
#version ⇒ Object
Returns the value of attribute version.
10 11 12 |
# File 'lib/mspire/mzml/software.rb', line 10 def version @version end |
Instance Method Details
#to_xml(builder) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/mspire/mzml/software.rb', line 18 def to_xml(builder) builder.software( id: @id, version: @version) do |sf_n| super(sf_n) end builder end |